Browse Source

admin: pohadka nema timestamp, priloha reseni ma misto timestampu

vytvoreno
export_seznamu_prednasek
Anet 6 years ago
parent
commit
91e88a31fb
  1. 7
      seminar/admin.py
  2. 2
      seminar/models.py

7
seminar/admin.py

@ -101,8 +101,8 @@ class CisloInline(admin.TabularInline):
class PrilohaReseniInline(admin.StackedInline): class PrilohaReseniInline(admin.StackedInline):
model = PrilohaReseni model = PrilohaReseni
fields = ['timestamp', 'soubor', 'poznamka'] fields = ['vytvoreno', 'soubor', 'poznamka']
readonly_fields = ['timestamp'] readonly_fields = ['vytvoreno']
formfield_overrides = { formfield_overrides = {
models.TextField: {'widget': forms.TextInput}, models.TextField: {'widget': forms.TextInput},
} }
@ -381,8 +381,7 @@ class PohadkaAdmin(VersionAdmin):
'get_rocnik', 'get_rocnik',
'get_kod_ulohy', 'get_kod_ulohy',
'uloha', 'uloha',
'autor', 'autor'
'timestamp'
] ]
get_form = get_form_predvypln_autora get_form = get_form_predvypln_autora

2
seminar/models.py

@ -850,7 +850,7 @@ class PrilohaReseni(SeminarModelBase):
db_table = 'seminar_priloha_reseni' db_table = 'seminar_priloha_reseni'
verbose_name = 'Příloha řešení' verbose_name = 'Příloha řešení'
verbose_name_plural = 'Přílohy řešení' verbose_name_plural = 'Přílohy řešení'
ordering = ['reseni', 'timestamp'] ordering = ['reseni', 'vytvoreno']
# Interní ID # Interní ID
id = models.AutoField(primary_key = True) id = models.AutoField(primary_key = True)

Loading…
Cancel
Save