diff --git a/cotisations/models.py b/cotisations/models.py index 83f81d5b..082847e7 100644 --- a/cotisations/models.py +++ b/cotisations/models.py @@ -659,9 +659,8 @@ def cotisation_post_save(sender, **kwargs): regen('mailing') -# TODO : should be name cotisation_post_delete @receiver(post_delete, sender=Cotisation) -def vente_post_delete(sender, **kwargs): +def cotisation_post_delete(sender, **kwargs): """ Mark some services as needing a regeneration after the deletion of a cotisation. Indeed the membership status may have changed. diff --git a/machines/models.py b/machines/models.py index 5af11b36..2b4eb4a2 100644 --- a/machines/models.py +++ b/machines/models.py @@ -1452,7 +1452,7 @@ def iptype_post_save(sender, **kwargs): @receiver(post_save, sender=MachineType) -def machine_post_save(sender, **kwargs): +def machinetype_post_save(sender, **kwargs): """Mise à jour des interfaces lorsque changement d'attribution d'une machinetype (changement iptype parent)""" machinetype = kwargs['instance'] @@ -1539,7 +1539,7 @@ def srv_post_save(sender, **kwargs): @receiver(post_delete, sender=Srv) -def text_post_delete(sender, **kwargs): +def srv_post_delete(sender, **kwargs): """Regeneration dns après modification d'un SRV""" regen('dns') diff --git a/users/admin.py b/users/admin.py index a6b70009..727b129c 100644 --- a/users/admin.py +++ b/users/admin.py @@ -56,19 +56,6 @@ from .forms import ( ) -class UserAdmin(admin.ModelAdmin): - """Administration d'un user""" - list_display = ( - 'surname', - 'pseudo', - 'email', - 'school', - 'shell', - 'state' - ) - search_fields = ('surname', 'pseudo') - - class LdapUserAdmin(admin.ModelAdmin): """Administration du ldapuser""" list_display = ('name', 'uidNumber', 'login_shell') @@ -143,8 +130,9 @@ class UserAdmin(VersionAdmin, BaseUserAdmin): 'is_admin', 'shell' ) - list_display = ('pseudo',) - list_filter = () + # Need to reset the settings from BaseUserAdmin + # They are using fields we don't use like 'is_staff' + list_filter=() fieldsets = ( (None, {'fields': ('pseudo', 'password')}), ( @@ -175,7 +163,7 @@ class UserAdmin(VersionAdmin, BaseUserAdmin): } ), ) - search_fields = ('pseudo',) + search_fields = ('pseudo', 'surname') ordering = ('pseudo',) filter_horizontal = ()