forked from DGNum/gestioCOF
modelform_factory requires fields or exclude (django 1.8)
This commit is contained in:
parent
4857af0f7f
commit
bf0a29655a
4 changed files with 4 additions and 4 deletions
|
@ -139,7 +139,7 @@ class AttributionAdmin(admin.ModelAdmin):
|
|||
|
||||
import autocomplete_light
|
||||
class ChoixSpectacleAdmin(admin.ModelAdmin):
|
||||
form = autocomplete_light.modelform_factory(ChoixSpectacle)
|
||||
form = autocomplete_light.modelform_factory(ChoixSpectacle, exclude=[])
|
||||
list_display = ("participant", "spectacle", "priority", "double_choice")
|
||||
list_filter = ("double_choice",)
|
||||
search_fields = ('participant__user__username', 'participant__user__first_name', 'participant__user__last_name')
|
||||
|
|
|
@ -159,7 +159,7 @@ class AttributionAdmin(admin.ModelAdmin):
|
|||
|
||||
import autocomplete_light
|
||||
class ChoixSpectacleAdmin(admin.ModelAdmin):
|
||||
form = autocomplete_light.modelform_factory(ChoixSpectacle)
|
||||
form = autocomplete_light.modelform_factory(ChoixSpectacle, exclude=[])
|
||||
list_display = ("participant", "spectacle", "priority", "double", "autoquit")
|
||||
list_filter = ("double", "autoquit")
|
||||
search_fields = ('participant__user__username', 'participant__user__first_name', 'participant__user__last_name')
|
||||
|
|
|
@ -162,7 +162,7 @@ class AttributionAdmin(admin.ModelAdmin):
|
|||
|
||||
import autocomplete_light
|
||||
class ChoixSpectacleAdmin(admin.ModelAdmin):
|
||||
form = autocomplete_light.modelform_factory(ChoixSpectacle)
|
||||
form = autocomplete_light.modelform_factory(ChoixSpectacle, exclude=[])
|
||||
list_display = ("participant", "spectacle", "priority", "double", "autoquit")
|
||||
list_filter = ("double", "autoquit")
|
||||
search_fields = ('participant__user__username', 'participant__user__first_name', 'participant__user__last_name')
|
||||
|
|
|
@ -144,7 +144,7 @@ def user_unicode(self):
|
|||
return self.username
|
||||
User.__unicode__ = user_unicode
|
||||
class EventRegistrationAdmin(admin.ModelAdmin):
|
||||
form = autocomplete_light.modelform_factory(EventRegistration)
|
||||
form = autocomplete_light.modelform_factory(EventRegistration, exclude=[])
|
||||
list_display = ('__unicode__','event','user','paid')
|
||||
list_filter = ('paid',)
|
||||
search_fields = ('user__username', 'user__first_name', 'user__last_name', 'user__email', 'event__title')
|
||||
|
|
Loading…
Reference in a new issue