8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-22 19:33:11 +00:00

Merge branch 'Fix_95' into 'master'

Fix #95 : Remove duplicates classes and functions

Closes #95

See merge request federez/re2o!126
This commit is contained in:
chirac 2018-04-14 17:11:15 +02:00
commit 02b7ab826b
4 changed files with 8 additions and 21 deletions

View file

@ -659,9 +659,8 @@ def cotisation_post_save(sender, **kwargs):
regen('mailing') regen('mailing')
# TODO : should be name cotisation_post_delete
@receiver(post_delete, sender=Cotisation) @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 Mark some services as needing a regeneration after the deletion of a
cotisation. Indeed the membership status may have changed. cotisation. Indeed the membership status may have changed.

View file

@ -375,7 +375,7 @@ def credit_solde(request, user, userid):
) )
return redirect(reverse('cotisations:index')) return redirect(reverse('cotisations:index'))
return form({ return form({
'factureform': facture, 'factureform': invoice,
'action_name': _("Edit") 'action_name': _("Edit")
}, 'cotisations/facture.html', request) }, 'cotisations/facture.html', request)

View file

@ -1452,7 +1452,7 @@ def iptype_post_save(sender, **kwargs):
@receiver(post_save, sender=MachineType) @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 """Mise à jour des interfaces lorsque changement d'attribution
d'une machinetype (changement iptype parent)""" d'une machinetype (changement iptype parent)"""
machinetype = kwargs['instance'] machinetype = kwargs['instance']
@ -1539,7 +1539,7 @@ def srv_post_save(sender, **kwargs):
@receiver(post_delete, sender=Srv) @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""" """Regeneration dns après modification d'un SRV"""
regen('dns') regen('dns')

View file

@ -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): class LdapUserAdmin(admin.ModelAdmin):
"""Administration du ldapuser""" """Administration du ldapuser"""
list_display = ('name', 'uidNumber', 'login_shell') list_display = ('name', 'uidNumber', 'login_shell')
@ -143,8 +130,9 @@ class UserAdmin(VersionAdmin, BaseUserAdmin):
'is_admin', 'is_admin',
'shell' 'shell'
) )
list_display = ('pseudo',) # Need to reset the settings from BaseUserAdmin
list_filter = () # They are using fields we don't use like 'is_staff'
list_filter=()
fieldsets = ( fieldsets = (
(None, {'fields': ('pseudo', 'password')}), (None, {'fields': ('pseudo', 'password')}),
( (
@ -175,7 +163,7 @@ class UserAdmin(VersionAdmin, BaseUserAdmin):
} }
), ),
) )
search_fields = ('pseudo',) search_fields = ('pseudo', 'surname')
ordering = ('pseudo',) ordering = ('pseudo',)
filter_horizontal = () filter_horizontal = ()