Update Injury admin
This commit is contained in:
parent
7b902fb1b6
commit
a47df78e40
|
@ -100,10 +100,31 @@ class InjuryLocationAdmin(admin.ModelAdmin):
|
|||
class InjuryAdmin(admin.ModelAdmin):
|
||||
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")
|
||||
list_display = ("date", "gymnast", "skill") # educative
|
||||
list_filter = ("date",)
|
||||
list_display = (
|
||||
"date",
|
||||
"gymnast",
|
||||
"mechanism",
|
||||
"location",
|
||||
"body_side",
|
||||
"nb_week_off",
|
||||
)
|
||||
list_filter = (
|
||||
("gymnast", RelatedDropdownFilter),
|
||||
("mechanism", DropdownFilter),
|
||||
("location", RelatedDropdownFilter),
|
||||
("body_side", DropdownFilter),
|
||||
)
|
||||
date_hierarchy = "date"
|
||||
search_fields = ("date", "gymnast") # educative
|
||||
autocomplete_fields = ("gymnast", "skill")
|
||||
|
|
Loading…
Reference in New Issue