Update Injury admin
This commit is contained in:
parent
7b902fb1b6
commit
a47df78e40
|
@ -100,10 +100,31 @@ class InjuryLocationAdmin(admin.ModelAdmin):
|
||||||
class InjuryAdmin(admin.ModelAdmin):
|
class InjuryAdmin(admin.ModelAdmin):
|
||||||
model = Injury
|
model = Injury
|
||||||
|
|
||||||
fields = ("date", "gymnast", "skill", "informations") # educative
|
fields = (
|
||||||
|
"date",
|
||||||
|
"gymnast",
|
||||||
|
"skill",
|
||||||
|
"location",
|
||||||
|
"body_side",
|
||||||
|
"mechanism",
|
||||||
|
"nb_week_off",
|
||||||
|
"informations",
|
||||||
|
)
|
||||||
readonly_fields = ("season", "week_number", "created_at", "updated_at")
|
readonly_fields = ("season", "week_number", "created_at", "updated_at")
|
||||||
list_display = ("date", "gymnast", "skill") # educative
|
list_display = (
|
||||||
list_filter = ("date",)
|
"date",
|
||||||
|
"gymnast",
|
||||||
|
"mechanism",
|
||||||
|
"location",
|
||||||
|
"body_side",
|
||||||
|
"nb_week_off",
|
||||||
|
)
|
||||||
|
list_filter = (
|
||||||
|
("gymnast", RelatedDropdownFilter),
|
||||||
|
("mechanism", DropdownFilter),
|
||||||
|
("location", RelatedDropdownFilter),
|
||||||
|
("body_side", DropdownFilter),
|
||||||
|
)
|
||||||
date_hierarchy = "date"
|
date_hierarchy = "date"
|
||||||
search_fields = ("date", "gymnast") # educative
|
search_fields = ("date", "gymnast") # educative
|
||||||
autocomplete_fields = ("gymnast", "skill")
|
autocomplete_fields = ("gymnast", "skill")
|
||||||
|
|
Loading…
Reference in New Issue