diff --git a/aldryn_newsblog/cms_wizards.py b/aldryn_newsblog/cms_wizards.py index 87627290..58994dbf 100644 --- a/aldryn_newsblog/cms_wizards.py +++ b/aldryn_newsblog/cms_wizards.py @@ -64,7 +64,7 @@ class CreateNewsBlogArticleForm(BaseFormMixin, TranslatableModelForm): TranslatableModelForm """ - content = forms.CharField( + article_content = forms.CharField( label=_('Content'), required=False, widget=TextEditorWidget, @@ -76,7 +76,7 @@ class CreateNewsBlogArticleForm(BaseFormMixin, TranslatableModelForm): class Meta: model = Article - fields = ['title', 'app_config', 'content'] + fields = ['title', 'app_config', 'article_content'] # The natural widget for app_config is meant for normal Admin views and # contains JS to refresh the page on change. This is not wanted here. widgets = {'app_config': forms.Select()} @@ -97,10 +97,10 @@ def save(self, commit=True): # Set owner to current user article.owner = self.user - # If 'content' field has value, create a TextPlugin with same and add + # If 'article_content' field has value, create a TextPlugin with same and add # it to the PlaceholderField - content = clean_html(self.cleaned_data.get('content', ''), False) - if content and permissions.has_plugin_permission( + article_content = clean_html(self.cleaned_data.get('article_content', ''), False) + if article_content and permissions.has_plugin_permission( self.user, 'TextPlugin', 'add'): # If the article has not been saved, then there will be no @@ -114,7 +114,7 @@ def save(self, commit=True): placeholder=article.content, plugin_type='TextPlugin', language=self.language_code, - body=content, + body=article_content, ) with transaction.atomic():