Skip to content
Snippets Groups Projects
Commit e096a4ef authored by Auriane Strasser's avatar Auriane Strasser
Browse files

change visits/admin.py to redirect to users

parent 6c386a5a
No related branches found
No related tags found
No related merge requests found
......@@ -3,7 +3,7 @@
from django import forms
from django.contrib import admin, messages
from django.template.defaultfilters import pluralize
from django.core import urlresolvers
from django.urls import reverse
from .models import Participation, Place, Visit
......@@ -113,7 +113,7 @@ class ParticipationAdmin(admin.ModelAdmin):
list_filter = ('submitted', 'accepted', 'present')
actions = [accept_selected_participations, reject_selected_participations]
def link_to_user (self,obj):
link=urlresolvers.reverse("admin:visits_user_change", args=[obj.user.id])
link=reverse("admin:visits_user_change", args=[obj.user.id])
return u'<a href="%s">%s</a>' % (link,obj.user.email)
link_to_user.allow_tags=True
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment