Welcome to procrastination haven !
+Welcome to procrastination heaven !
Le site va subir progressivement des mises à jour pendant ces vacances. Si vous rencontrez des instabilités, diff --git a/users/admin.py b/users/admin.py index c98a02e..f4adab3 100644 --- a/users/admin.py +++ b/users/admin.py @@ -59,7 +59,7 @@ class UserAdmin(VersionAdmin, BaseUserAdmin): (_('Important dates'), {'fields': ('last_login', 'date_joined')}), ) list_display = ('username', 'email', 'first_name', 'last_name', - 'maxemprunt', 'is_adherent', 'is_staff', 'actions_btn') + 'maxemprunt', 'is_adherent', 'is_staff') list_filter = (IsAdherentFilter, 'is_staff', 'is_superuser', 'is_active', 'groups') @@ -114,17 +114,6 @@ class UserAdmin(VersionAdmin, BaseUserAdmin): is_adherent.short_description = _('is adherent') is_adherent.allow_tags = True - def actions_btn(self, obj): - # TODO permit adhere only if perms.media.add_emprunt - return format_html( - '{}', - reverse('media:add-emprunt', args=[obj.pk]), - _('Register borrowed item') - ) - - actions_btn.short_description = _('actions') - actions_btn.allow_tags = True - admin_site.register(User, UserAdmin) admin_site.register(Adhesion, AdhesionAdmin)