fix: Fix member detail view
This commit is contained in:
parent
3faf7d58ac
commit
9af46290fa
@ -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)])
|
||||
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
{% extends "library/base_generic.html" %}
|
||||
{% extends "fellchensammlung/base_generic.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block content %}
|
||||
|
@ -32,6 +32,7 @@ urlpatterns = [
|
||||
###########
|
||||
## USERS ##
|
||||
###########
|
||||
# ex: user/1
|
||||
path("user/<int:user_id>/", views.member_detail, name="user-detail"),
|
||||
|
||||
]
|
||||
|
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user