fnp
/
redakcja.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix
[redakcja.git]
/
src
/
documents
/
forms.py
diff --git
a/src/documents/forms.py
b/src/documents/forms.py
index
bb064ee
..
217a6e7
100644
(file)
--- 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.db.models import Count
from django import forms
-from django.utils.translation import
u
gettext_lazy as _
+from django.utils.translation import gettext_lazy as _
from django.conf import settings
from slugify import slugify
from .constants import MASTERS
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
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)
def __init__(self, *args, **kwargs):
super(DocumentCreateForm, self).__init__(*args, **kwargs)
@@
-151,7
+153,7
@@
class BookForm(forms.ModelForm):
class Meta:
model = Book
class Meta:
model = Book
- exclude = ['project']
+ exclude = ['project'
, 'cover'
]
def __init__(self, *args, **kwargs):
ret = super(BookForm, self).__init__(*args, **kwargs)
def __init__(self, *args, **kwargs):
ret = super(BookForm, self).__init__(*args, **kwargs)
@@
-251,4
+253,5
@@
class MarkFinalForm(forms.Form):
class PublishOptionsForm(forms.Form):
days = forms.IntegerField(label=u'po ilu dniach udostępnienić (0 = od razu)', min_value=0, initial=0)
class PublishOptionsForm(forms.Form):
days = forms.IntegerField(label=u'po ilu dniach udostępnienić (0 = od razu)', min_value=0, initial=0)
+ hidden = forms.BooleanField(label='tekst ukryty przed wyszukiwaniem', required=False, initial=False)
beta = forms.BooleanField(label=u'Opublikuj na wersji testowej', required=False)
beta = forms.BooleanField(label=u'Opublikuj na wersji testowej', required=False)