parent
ec2079c417
commit
89590b88de
2 changed files with 19 additions and 2 deletions
|
@ -46,12 +46,14 @@ class SurveyQuestionInline(admin.TabularInline):
|
|||
|
||||
|
||||
class SurveyQuestionAdmin(admin.ModelAdmin):
|
||||
search_fields = ('survey__title', 'answer')
|
||||
inlines = [
|
||||
SurveyQuestionAnswerInline,
|
||||
]
|
||||
|
||||
|
||||
class SurveyAdmin(admin.ModelAdmin):
|
||||
search_fields = ('title', 'details')
|
||||
inlines = [
|
||||
SurveyQuestionInline,
|
||||
]
|
||||
|
@ -72,12 +74,14 @@ class EventCommentFieldInline(admin.TabularInline):
|
|||
|
||||
|
||||
class EventOptionAdmin(admin.ModelAdmin):
|
||||
search_fields = ('event__title', 'name')
|
||||
inlines = [
|
||||
EventOptionChoiceInline,
|
||||
]
|
||||
|
||||
|
||||
class EventAdmin(admin.ModelAdmin):
|
||||
search_fields = ('title', 'location', 'description')
|
||||
inlines = [
|
||||
EventOptionInline,
|
||||
EventCommentFieldInline,
|
||||
|
@ -189,6 +193,7 @@ class PetitCoursAbilityAdmin(admin.ModelAdmin):
|
|||
|
||||
class PetitCoursAttributionAdmin(admin.ModelAdmin):
|
||||
list_display = ('user', 'demande', 'matiere', 'rank', )
|
||||
search_fields = ('user__username', 'matiere__name')
|
||||
|
||||
|
||||
class PetitCoursAttributionCounterAdmin(admin.ModelAdmin):
|
||||
|
@ -208,6 +213,11 @@ class PetitCoursDemandeAdmin(admin.ModelAdmin):
|
|||
list_display = ('name', 'email', 'agrege_requis', 'niveau', 'created',
|
||||
'traitee', 'processed')
|
||||
list_filter = ('traitee', 'niveau')
|
||||
search_fields = ('name', 'email', 'phone', 'lieu', 'remarques')
|
||||
|
||||
|
||||
class CustomMailAdmin(admin.ModelAdmin):
|
||||
search_fields = ('shortname', 'title')
|
||||
|
||||
admin.site.register(Survey, SurveyAdmin)
|
||||
admin.site.register(SurveyQuestion, SurveyQuestionAdmin)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue