Admin: akce na vyřešení problémů
This commit is contained in:
parent
9d6d4891d0
commit
bc9b55085f
1 changed files with 5 additions and 0 deletions
|
|
@ -145,6 +145,11 @@ class ProblemAdmin(PolymorphicParentModelAdmin):
|
|||
# Pokud chceme orezavat na aktualni rocnik, musime do modelu pridat odkaz na rocnik. Zatim bere vse.
|
||||
search_fields = ['nazev']
|
||||
list_filter = ['stav']
|
||||
actions = ['vyres_problemy']
|
||||
|
||||
@admin.action(description= 'Označit problémy jako vyřešené')
|
||||
def vyres_problemy(self, req, qs):
|
||||
qs.update(stav=Problem.STAV_VYRESENY)
|
||||
|
||||
|
||||
# V ProblemAdmin to nejde, protoze se to nepropise do deti
|
||||
|
|
|
|||
Loading…
Reference in a new issue