X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/1d5395d0e29c482f1060be3d7def7aff15752014..2dd4071b8858c9727ee3e2c09b73b1eadef6e31e:/src/documents/forms.py?ds=sidebyside diff --git a/src/documents/forms.py b/src/documents/forms.py index 418ae4ac..4c970339 100644 --- a/src/documents/forms.py +++ b/src/documents/forms.py @@ -3,7 +3,7 @@ # from django.db.models import Count from django import forms -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from django.conf import settings from slugify import slugify from .constants import MASTERS @@ -20,7 +20,9 @@ class DocumentCreateForm(forms.ModelForm): class Meta: model = Book - exclude = ['parent', 'parent_number', 'project'] + fields = [ + 'title', 'slug', 'public', 'gallery' + ] def __init__(self, *args, **kwargs): super(DocumentCreateForm, self).__init__(*args, **kwargs) @@ -151,7 +153,7 @@ class BookForm(forms.ModelForm): class Meta: model = Book - exclude = ['project'] + exclude = ['project', 'cover', 'legimi_id', 'woblink_id'] def __init__(self, *args, **kwargs): ret = super(BookForm, self).__init__(*args, **kwargs)