Merge branch 'python3' of gimli.ms.mff.cuni.cz:/akce/mam/git/mamweb into python3
This commit is contained in:
commit
6b41719e60
2 changed files with 9 additions and 7 deletions
|
@ -101,8 +101,8 @@ class CisloInline(admin.TabularInline):
|
|||
|
||||
class PrilohaReseniInline(admin.StackedInline):
|
||||
model = PrilohaReseni
|
||||
fields = ['timestamp', 'soubor', 'poznamka']
|
||||
readonly_fields = ['timestamp']
|
||||
fields = ['vytvoreno', 'soubor', 'poznamka']
|
||||
readonly_fields = ['vytvoreno']
|
||||
formfield_overrides = {
|
||||
models.TextField: {'widget': forms.TextInput},
|
||||
}
|
||||
|
@ -381,8 +381,7 @@ class PohadkaAdmin(VersionAdmin):
|
|||
'get_rocnik',
|
||||
'get_kod_ulohy',
|
||||
'uloha',
|
||||
'autor',
|
||||
'timestamp'
|
||||
'autor'
|
||||
]
|
||||
|
||||
get_form = get_form_predvypln_autora
|
||||
|
|
|
@ -561,7 +561,9 @@ class Soustredeni(SeminarModelBase):
|
|||
class Problem(SeminarModelBase):
|
||||
|
||||
class Meta:
|
||||
abstract = True
|
||||
# Není abstraktní, protože se na něj jinak nedají dělat ForeignKeys.
|
||||
# TODO: Udělat to polymorfní (pomocí django-polymorphic), abychom dostali po těch vazbách přímo tu úlohu/témátko vč. fieldů, které nejsou součástí modelu Problem?
|
||||
#abstract = True
|
||||
verbose_name = 'Problém'
|
||||
verbose_name_plural = 'Problémy'
|
||||
ordering = ['nazev']
|
||||
|
@ -738,7 +740,8 @@ class Reseni(SeminarModelBase):
|
|||
db_table = 'seminar_reseni'
|
||||
verbose_name = 'Řešení'
|
||||
verbose_name_plural = 'Řešení'
|
||||
ordering = ['-problem_id', 'resitel']
|
||||
#ordering = ['-problem', 'resitele'] # FIXME: Takhle to chceme, ale nefunguje to.
|
||||
ordering = ['-cas_doruceni']
|
||||
|
||||
# Interní ID
|
||||
id = models.AutoField(primary_key = True)
|
||||
|
@ -850,7 +853,7 @@ class PrilohaReseni(SeminarModelBase):
|
|||
db_table = 'seminar_priloha_reseni'
|
||||
verbose_name = 'Příloha řešení'
|
||||
verbose_name_plural = 'Přílohy řešení'
|
||||
ordering = ['reseni', 'timestamp']
|
||||
ordering = ['reseni', 'vytvoreno']
|
||||
|
||||
# Interní ID
|
||||
id = models.AutoField(primary_key = True)
|
||||
|
|
Loading…
Reference in a new issue