diff --git a/forms.py b/forms.py index deb921b..293b740 100644 --- a/forms.py +++ b/forms.py @@ -101,7 +101,19 @@ def __init__(self, *args, **kwargs): class Meta: model = models.Chapter - exclude = ('book', 'filename', 'keywords', 'publisher_notes') + fields = [ + 'title', + 'description', + 'pages', + 'doi', + 'number', + 'date_embargo', + 'date_published', + 'sequence', + 'contributors', + 'license_information', + 'custom_how_to_cite', + ] def save(self, commit=True, book=None, *args, **kwargs): save_chapter = super(ChapterForm, self).save(commit=False) diff --git a/models.py b/models.py index 8cb9ce4..b4ea3b5 100644 --- a/models.py +++ b/models.py @@ -448,10 +448,9 @@ class Chapter(models.Model): custom_how_to_cite = models.TextField( blank=True, null=True, help_text="Custom 'how to cite' text. To be used only if the block" - " generated by Janeway is not suitable.", + " generated by Janeway is not suitable.", ) - class Meta: ordering = ('sequence', 'number',)