You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

31 lines
789 B

from django.forms import forms
from django.utils.translation import ugettext_lazy as _
from pinax.blog.forms import AdminPostForm as BaseAdminPostForm
from blog_ext.models import Post
FIELDS = [
"section",
"author",
"preview_image",
"markup",
"title",
"slug",
"teaser",
"content",
"description",
"state"
]
class AdminPostForm(BaseAdminPostForm):
preview_image = forms.FileField(label=_('Превью изображение'), allow_empty_file=True)
class Meta:
model = Post
fields = FIELDS
AdminPostForm.declared_fields.get('teaser').label = _('Превью')
AdminPostForm.declared_fields.get('content').label = _('Содержимое')
AdminPostForm.declared_fields.get('description').label = _('Описание')