admin: ReseniKResiteliInline oprava timstampu.
This commit is contained in:
parent
95525099fd
commit
db5f5d9607
1 changed files with 10 additions and 10 deletions
|
@ -114,7 +114,7 @@ class PrilohaReseniInline(admin.StackedInline):
|
||||||
class ProblemInline(admin.TabularInline):
|
class ProblemInline(admin.TabularInline):
|
||||||
model = Problem
|
model = Problem
|
||||||
fk_name = 'cislo_zadani'
|
fk_name = 'cislo_zadani'
|
||||||
fields = ['kod', 'typ', 'nazev', 'body', 'opravovatel', 'stav']
|
fields = ['kod', 'nazev', 'autor', 'garant', 'opravovatele', 'stav']
|
||||||
formfield_overrides = {
|
formfield_overrides = {
|
||||||
models.TextField: {'widget': forms.TextInput},
|
models.TextField: {'widget': forms.TextInput},
|
||||||
}
|
}
|
||||||
|
@ -150,7 +150,7 @@ class ReseniKProblemuInline(admin.TabularInline):
|
||||||
class ReseniKResiteliInline(admin.TabularInline):
|
class ReseniKResiteliInline(admin.TabularInline):
|
||||||
model = Reseni
|
model = Reseni
|
||||||
fields = ['problem', 'forma', 'body', 'cislo_body', 'timestamp', 'poznamka']
|
fields = ['problem', 'forma', 'body', 'cislo_body', 'timestamp', 'poznamka']
|
||||||
readonly_fields = ['timestamp', 'problem']
|
readonly_fields = ['cas_doruceni', 'problem']
|
||||||
extra = 0
|
extra = 0
|
||||||
formfield_overrides = {
|
formfield_overrides = {
|
||||||
models.TextField: {'widget': forms.TextInput},
|
models.TextField: {'widget': forms.TextInput},
|
||||||
|
@ -260,7 +260,7 @@ class CisloAdmin(VersionAdmin):
|
||||||
'pdf'
|
'pdf'
|
||||||
]
|
]
|
||||||
}),
|
}),
|
||||||
(u'Data', {'fields': ['datum_vydani', 'datum_deadline',
|
('Data', {'fields': ['datum_vydani', 'datum_deadline',
|
||||||
'datum_deadline_soustredeni']}),
|
'datum_deadline_soustredeni']}),
|
||||||
]
|
]
|
||||||
list_display = [
|
list_display = [
|
||||||
|
@ -275,10 +275,10 @@ class CisloAdmin(VersionAdmin):
|
||||||
list_filter = ['rocnik']
|
list_filter = ['rocnik']
|
||||||
view_on_site = Cislo.verejne_url
|
view_on_site = Cislo.verejne_url
|
||||||
actions = [
|
actions = [
|
||||||
make_set_action('verejne_db', True, u'Zveřejnit číslo'),
|
make_set_action('verejne_db', True, 'Zveřejnit číslo'),
|
||||||
make_set_action('verejne_db', False, u'Skrýt (zneveřejnit) číslo'),
|
make_set_action('verejne_db', False, 'Skrýt (zneveřejnit) číslo'),
|
||||||
make_set_action('verejna_vysledkovka', True, u'Zveřejnit výsledkovku'),
|
make_set_action('verejna_vysledkovka', True, 'Zveřejnit výsledkovku'),
|
||||||
make_set_action('verejna_vysledkovka', False, u'Skrýt (zneveřejnit) výsledkovku'),
|
make_set_action('verejna_vysledkovka', False, 'Skrýt (zneveřejnit) výsledkovku'),
|
||||||
]
|
]
|
||||||
inlines = [ProblemInline]
|
inlines = [ProblemInline]
|
||||||
|
|
||||||
|
@ -447,7 +447,7 @@ class ProblemAdmin(VersionAdmin):
|
||||||
form = ProblemAdminForm
|
form = ProblemAdminForm
|
||||||
fieldsets = [
|
fieldsets = [
|
||||||
(None, {'fields': ['nazev', 'typ', 'stav', 'autor', 'zamereni', 'body', 'timestamp', 'import_dakos_id']}),
|
(None, {'fields': ['nazev', 'typ', 'stav', 'autor', 'zamereni', 'body', 'timestamp', 'import_dakos_id']}),
|
||||||
(u'Vydání', {'fields': ['cislo_zadani', 'kod', 'cislo_reseni', 'opravovatel',]}),
|
(u'Vydání', {'fields': ['kod', 'cislo_reseni', 'opravovatel',]}),
|
||||||
(None, {'fields': ['text_zadani', 'text_reseni', 'text_org',]}),
|
(None, {'fields': ['text_zadani', 'text_reseni', 'text_org',]}),
|
||||||
]
|
]
|
||||||
list_select_related = True
|
list_select_related = True
|
||||||
|
@ -563,8 +563,8 @@ class SoustredeniAdminForm(forms.ModelForm):
|
||||||
class SoustredeniAdmin(VersionAdmin):
|
class SoustredeniAdmin(VersionAdmin):
|
||||||
form = SoustredeniAdminForm
|
form = SoustredeniAdminForm
|
||||||
fieldsets = [
|
fieldsets = [
|
||||||
(None, {'fields': ['rocnik', 'misto', 'typ', 'verejne_db', 'exportovat', 'text']}),
|
(None, {'fields': ['rocnik', 'misto', 'typ', 'verejne_db', 'exportovat', 'text']}),
|
||||||
(u'Data', {'fields': ['datum_zacatku', 'datum_konce']}),
|
('Data', {'fields': ['datum_zacatku', 'datum_konce']}),
|
||||||
]
|
]
|
||||||
list_display = ['rocnik', 'misto', 'datum_zacatku', 'typ', 'exportovat', 'verejne']
|
list_display = ['rocnik', 'misto', 'datum_zacatku', 'typ', 'exportovat', 'verejne']
|
||||||
inlines = [Soustredeni_UcastniciInline, Soustredeni_OrganizatoriInline]
|
inlines = [Soustredeni_UcastniciInline, Soustredeni_OrganizatoriInline]
|
||||||
|
|
Loading…
Reference in a new issue