tweak service admin
authorOlivier Larchevêque <olivier.larcheveque@auf.org>
Tue, 17 Apr 2012 19:35:49 +0000 (15:35 -0400)
committerOlivier Larchevêque <olivier.larcheveque@auf.org>
Tue, 17 Apr 2012 19:35:49 +0000 (15:35 -0400)
project/rh/admin.py

index ca4d9eb..2f7fff2 100644 (file)
@@ -1002,7 +1002,7 @@ class ServiceAdmin(AUFMetadataAdminMixin, admin.ModelAdmin, ArchiveMixin):
     _date_modification.admin_order_field = 'date_modification'
 
 class ServiceProxyAdmin(ServiceAdmin):
-    list_display = ('nom', '_organigramme')
+    list_display = ('nom', '_organigramme', '_archive', )
     actions = None
 
     def __init__(self, *args, **kwargs):
@@ -1015,15 +1015,6 @@ class ServiceProxyAdmin(ServiceAdmin):
     def has_change_permission(self, request, obj=None):
         return in_drh_or_admin(request.user)
 
-    def changelist_view(self, request, extra_context=None):
-        if not request.GET.has_key('status__exact'):
-            q = request.GET.copy()
-            q['archive__exact'] = '0'
-            request.GET = q
-            request.META['QUERY_STRING'] = request.GET.urlencode()
-        return super(ServiceProxyAdmin,self).changelist_view(request,
-                extra_context=extra_context)
-
     def _organigramme(self, obj):
         return """<a href="%s"><strong>Organigramme</strong></a>""" % \
                 (reverse('rho_service', args=(obj.id,)))