I'm nearing the end of my project, a blog. I have set DEBUG = False for security.
This breaks my CKEDITOR, making it just not appear at all when the page is loaded.
When DEBUG = True it works fine.
template:
<form class="text-center m-3" action="." method="POST" enctype="multipart/form-data">
{% csrf_token %}
{{ form.media }}
{{ form.as_p }}
<button class="btn btn-signup right" id="button">Post »</button>
forms.py:
class PostForm (forms.ModelForm):
class Meta:
model = Post
fields = ('title', 'excerpt', 'featured_image',
'content', 'author')
widgets = {
'title': forms.TextInput(attrs={'placeholder':
'Give it a catchy title'}),
'excerpt': forms.TextInput(attrs={'placeholder':
'E.g. My first ever post'}),
'content': forms.Textarea(
attrs={'placeholder':
'<p>Wrap your content in these P tags to create a paragraph</p> \
\n\n<b>Wrap your words in these B tags \
to make them bold</b>'}),
'author': forms.TextInput(
attrs={'class': 'form-control', 'value': '',
'id': 'user', 'type': 'hidden'}),
}