Commit aa7ded9f authored by Maël Kervella's avatar Maël Kervella

Fix #95 by removing duplicates classes and functions

parent badad163
......@@ -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.
......
......@@ -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')
......@@ -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 = ()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment