|
@ -298,6 +298,12 @@ create_modeladmin(ProblemZadanyAdmin, Problem, 'ProblemZadany', verbose_name=u'P |
|
|
|
|
|
|
|
|
### Soustredeni |
|
|
### Soustredeni |
|
|
|
|
|
|
|
|
|
|
|
def zverejnit_soustredeni(modeladmin, request, queryset): |
|
|
|
|
|
for soustredeni in queryset: |
|
|
|
|
|
soustredeni.verejne_db = True |
|
|
|
|
|
soustredeni.save() |
|
|
|
|
|
zverejnit_soustredeni.short_description = 'Zveřejnit soustředění' |
|
|
|
|
|
|
|
|
class SoustredeniAdminForm(forms.ModelForm): |
|
|
class SoustredeniAdminForm(forms.ModelForm): |
|
|
text = forms.CharField(widget=CKEditorWidget(), required=False, **field_labels(Soustredeni, 'text')) |
|
|
text = forms.CharField(widget=CKEditorWidget(), required=False, **field_labels(Soustredeni, 'text')) |
|
|
class Meta: |
|
|
class Meta: |
|
@ -314,6 +320,7 @@ class SoustredeniAdmin(reversion.VersionAdmin): |
|
|
inlines = [Soustredeni_UcastniciInline] |
|
|
inlines = [Soustredeni_UcastniciInline] |
|
|
list_filter = ['rocnik'] |
|
|
list_filter = ['rocnik'] |
|
|
view_on_site = Soustredeni.verejne_url |
|
|
view_on_site = Soustredeni.verejne_url |
|
|
|
|
|
actions = [zverejnit_soustredeni,] |
|
|
|
|
|
|
|
|
admin.site.register(Soustredeni, SoustredeniAdmin) |
|
|
admin.site.register(Soustredeni, SoustredeniAdmin) |
|
|
|
|
|
|
|
|