@ -5,7 +5,7 @@ from django import forms
from django . forms import widgets
from django . forms import widgets
from reversion . admin import VersionAdmin
from reversion . admin import VersionAdmin
from solo . admin import SingletonModelAdmin
from solo . admin import SingletonModelAdmin
from ckeditor . widgets import CKEditorWidget
from ckeditor_uploader . widgets import CKEditorUploading Widget
from django . db . models import Count
from django . db . models import Count
from django . db import models
from django . db import models
from django . utils . safestring import mark_safe
from django . utils . safestring import mark_safe
@ -402,9 +402,9 @@ from autocomplete_light.contrib.taggit_field import TaggitField, TaggitWidget
class ProblemAdminForm ( forms . ModelForm ) :
class ProblemAdminForm ( forms . ModelForm ) :
text_zadani = forms . CharField ( widget = CKEditorWidget ( ) , required = False , * * field_labels ( Problem , ' text_zadani ' ) )
text_zadani = forms . CharField ( widget = CKEditorUploading Widget ( ) , required = False , * * field_labels ( Problem , ' text_zadani ' ) )
text_reseni = forms . CharField ( widget = CKEditorWidget ( ) , required = False , * * field_labels ( Problem , ' text_reseni ' ) )
text_reseni = forms . CharField ( widget = CKEditorUploading Widget ( ) , required = False , * * field_labels ( Problem , ' text_reseni ' ) )
text_org = forms . CharField ( widget = CKEditorWidget ( ) , required = False , * * field_labels ( Problem , ' text_org ' ) )
text_org = forms . CharField ( widget = CKEditorUploading Widget ( ) , required = False , * * field_labels ( Problem , ' text_org ' ) )
zamereni = TaggitField ( widget = TaggitWidget ( ' TagAutocomplete ' ) , required = False )
zamereni = TaggitField ( widget = TaggitWidget ( ' TagAutocomplete ' ) , required = False )
autor = UserModelChoiceField ( User . objects . filter ( is_staff = True ) )
autor = UserModelChoiceField ( User . objects . filter ( is_staff = True ) )
opravovatel = UserModelChoiceField ( User . objects . filter ( is_staff = True ) , required = False )
opravovatel = UserModelChoiceField ( User . objects . filter ( is_staff = True ) , required = False )
@ -536,9 +536,9 @@ create_modeladmin(ProblemZadanyAdmin, Problem, 'ProblemZadany', verbose_name=u'P
### Prispevek (k tematkum)
### Prispevek (k tematkum)
class PrispevekAdminForm ( forms . ModelForm ) :
class PrispevekAdminForm ( forms . ModelForm ) :
text_org = forms . CharField ( widget = CKEditorWidget ( ) , required = False ,
text_org = forms . CharField ( widget = CKEditorUploading Widget ( ) , required = False ,
* * field_labels ( Prispevek , ' text_org ' ) )
* * field_labels ( Prispevek , ' text_org ' ) )
text_resitel = forms . CharField ( widget = CKEditorWidget ( ) , required = False ,
text_resitel = forms . CharField ( widget = CKEditorUploading Widget ( ) , required = False ,
* * field_labels ( Prispevek , ' text_resitel ' ) )
* * field_labels ( Prispevek , ' text_resitel ' ) )
class Meta :
class Meta :
@ -554,7 +554,7 @@ admin.site.register(Prispevek, PrispevekAdmin)
### Soustredeni
### Soustredeni
class SoustredeniAdminForm ( forms . ModelForm ) :
class SoustredeniAdminForm ( forms . ModelForm ) :
text = forms . CharField ( widget = CKEditorWidget ( ) , required = False , * * field_labels ( Soustredeni , ' text ' ) )
text = forms . CharField ( widget = CKEditorUploading Widget ( ) , required = False , * * field_labels ( Soustredeni , ' text ' ) )
class Meta :
class Meta :
model = Soustredeni
model = Soustredeni
exclude = [ ]
exclude = [ ]
@ -595,7 +595,7 @@ admin.site.register(Konfera,KonferaAdmin)
### Novinky
### Novinky
class NovinkyAdminForm ( forms . ModelForm ) :
class NovinkyAdminForm ( forms . ModelForm ) :
text = forms . CharField ( widget = CKEditorWidget ( ) , required = False ,
text = forms . CharField ( widget = CKEditorUploading Widget ( ) , required = False ,
* * field_labels ( Novinky , ' text ' ) )
* * field_labels ( Novinky , ' text ' ) )
autor = UserModelChoiceField ( User . objects . filter ( is_staff = True ) )
autor = UserModelChoiceField ( User . objects . filter ( is_staff = True ) )