diff --git a/src/fellchensammlung/models.py b/src/fellchensammlung/models.py index 6bdc095..8d43d13 100644 --- a/src/fellchensammlung/models.py +++ b/src/fellchensammlung/models.py @@ -7,6 +7,7 @@ from django.utils.translation import gettext_lazy as _ from datetime import datetime from django.dispatch import receiver from django.db.models.signals import post_save +from django.contrib.auth.models import Group from fellchensammlung.tools import misc @@ -326,5 +327,3 @@ class Member(models.Model): def get_absolute_url(self): return reverse("member-detail", args=[str(self.user.id)]) - - diff --git a/src/fellchensammlung/templates/fellchensammlung/details/detail-member.html b/src/fellchensammlung/templates/fellchensammlung/details/detail-member.html index acd0728..fabc6c3 100644 --- a/src/fellchensammlung/templates/fellchensammlung/details/detail-member.html +++ b/src/fellchensammlung/templates/fellchensammlung/details/detail-member.html @@ -1,4 +1,4 @@ -{% extends "library/base_generic.html" %} +{% extends "fellchensammlung/base_generic.html" %} {% load i18n %} {% block content %} diff --git a/src/fellchensammlung/urls.py b/src/fellchensammlung/urls.py index d0e9d2a..af482a7 100644 --- a/src/fellchensammlung/urls.py +++ b/src/fellchensammlung/urls.py @@ -32,6 +32,7 @@ urlpatterns = [ ########### ## USERS ## ########### + # ex: user/1 path("user//", views.member_detail, name="user-detail"), ] diff --git a/src/fellchensammlung/views.py b/src/fellchensammlung/views.py index 9de3512..8d6d432 100644 --- a/src/fellchensammlung/views.py +++ b/src/fellchensammlung/views.py @@ -121,8 +121,8 @@ def report_detail_success(request, report_id): return report_detail(request, report_id, form_complete=True) -def member_detail(request, user): - member = Member.objects.get(user=user) +def member_detail(request, user_id): + member = Member.objects.get(id=user_id) context = {"member": member} return render(request, 'fellchensammlung/details/detail-member.html', context=context)