Commit d4c8eb7e authored by Sébastiaan Versteeg's avatar Sébastiaan Versteeg Committed by Sébastiaan Versteeg
Browse files

Fix societies pages

parent c932ce87
......@@ -107,9 +107,6 @@ class MemberGroup(models.Model, metaclass=ModelTranslateMeta):
def __str__(self):
return self.name
def get_absolute_url(self):
return reverse('activemembers:committee', args=[str(self.pk)])
class Meta:
verbose_name = _('member group')
verbose_name_plural = _('member groups')
......@@ -128,6 +125,9 @@ class Committee(MemberGroup):
blank=True,
max_length=50)
def get_absolute_url(self):
return reverse('activemembers:committee', args=[str(self.pk)])
class Meta:
verbose_name = _('committee')
verbose_name_plural = _('committees')
......@@ -140,6 +140,9 @@ class Society(MemberGroup):
objects = models.Manager()
active_objects = ActiveMemberGroupManager()
def get_absolute_url(self):
return reverse('activemembers:society', args=[str(self.pk)])
class Meta:
verbose_name = _('society')
verbose_name_plural = _('societies')
......
{% extends "base.html" %}
{% extends "activemembers/membergroup_detail.html" %}
{% load i18n %}
{% block title %}{{ membergroup.name }} — {% trans 'Societies' %} — {{ block.super }}{% endblock %}
......
......@@ -11,7 +11,7 @@ register = template.Library()
@register.inclusion_tag('includes/grid_item.html')
def membergroup_card(group):
image_url = static('activemembers/images/placeholder.png')
image_url = static('activemembers/images/placeholder_overview.png')
if group.photo:
image_url = thumbnail(group.photo, '220x220')
......
......@@ -125,14 +125,14 @@ def society_detail(request, pk):
.filter(group=society)
.prefetch_related('member__membergroupmembership_set'))
members = [{
'profile': x.member.profile,
'member': x.member,
'chair': x.chair,
'role': x.role,
'since': x.initial_connected_membership.since
} for x in memberships]
members.sort(key=lambda x: x['member_since'])
members.sort(key=lambda x: x['since'])
return render(request, 'activemembers/society_detail.html',
{'committee': society,
{'membergroup': society,
'members': members})
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment