X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/b41227def9e350f773c9c10b73a72fe9422233c1..e81283e08cca4c47d57dd0aef34a5c598931a9d2:/apps/catalogue/forms.py?ds=sidebyside diff --git a/apps/catalogue/forms.py b/apps/catalogue/forms.py index 5a0b2d5a..ea6a4aef 100644 --- a/apps/catalogue/forms.py +++ b/apps/catalogue/forms.py @@ -203,7 +203,7 @@ class MarkFinalForm(forms.Form): def clean_books(self): books_value = self.cleaned_data['books'] - slugs = [line.split('/')[-2] for line in books_value.split('\n') if line.strip()] + slugs = [line.strip().strip('/').split('/')[-1] for line in books_value.split('\n') if line.strip()] books = Book.objects.filter(slug__in=slugs) if len(books) != len(slugs): raise forms.ValidationError( @@ -227,3 +227,8 @@ class MarkFinalForm(forms.Form): tags=[Chunk.tag_model.objects.get(slug='editor-proofreading')], publishable=True ) + + +class PublishOptionsForm(forms.Form): + days = forms.IntegerField(label=u'po ilu dniach udostępnienić (0 = od razu)', min_value=0, initial=0) + beta = forms.BooleanField(label=u'Opublikuj na wersji testowej', required=False)