]> git.parisson.com Git - teleforma.git/commitdiff
Add quota admin search fields
authorGuillaume Pellerin <yomguy@parisson.com>
Wed, 18 Feb 2015 17:29:55 +0000 (18:29 +0100)
committerGuillaume Pellerin <yomguy@parisson.com>
Wed, 18 Feb 2015 17:29:55 +0000 (18:29 +0100)
teleforma/exam/admin.py

index 3c34141c2e8a2ed72a125a69c974079fe2b3808a..4c857c4213dfd8efc36cdf95994021b3542e9622 100644 (file)
@@ -12,11 +12,12 @@ class QuotaAdminForm(forms.ModelForm):
 
 
 class QuotaAdmin(admin.ModelAdmin):
+    model= Quota
     form = QuotaAdminForm
     list_display = ['corrector_name', 'course', 'date_start', 'date_end',
-                    'pending_script_count', 'marked_script_count', 'all_script_count']
-    search_fields = ['corrector__username', 'corrector__last_name', 'course__title', 'course__code']
-    date_hierarchy = ['date_start', 'date_end']
+                    'pending_script_count', 'marked_script_count', 'all_script_count', 'value']
+    list_filter = ['course__title']
+    search_fields = ['corrector__username', 'corrector__last_name']
 
     def corrector_name(self, instance):
         return instance.corrector.last_name + ' ' + instance.corrector.first_name