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

change visits/admin.py to redirect to users

parent f0927315
Branches
No related tags found
No related merge requests found
...@@ -107,10 +107,14 @@ reject_selected_participations.short_description = ( ...@@ -107,10 +107,14 @@ reject_selected_participations.short_description = (
class ParticipationAdmin(admin.ModelAdmin): class ParticipationAdmin(admin.ModelAdmin):
"""Admin panel for visit participations.""" """Admin panel for visit participations."""
list_display = ('submitted', 'visit', 'user', list_display = ('submitted', 'visit', 'link_to_user',
'accepted', 'present') 'accepted', 'present')
list_filter = ('submitted', 'accepted', 'present') list_filter = ('submitted', 'accepted', 'present')
actions = [accept_selected_participations, reject_selected_participations] actions = [accept_selected_participations, reject_selected_participations]
def link_to_user (self,obj):
link=urlresolvers.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
@admin.register(Visit.organizers.through) @admin.register(Visit.organizers.through)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment