install django-ckeditor
pip install django-ckeditor
Change body field of Post model
models.py
from ckeditor.fields import RichTextField
class Post(models.Model):
body = RichTextField(blank=True, null=True)
makemigrations and migrate
add_post.html
<div class="form-group">
<form method="POST">
{% csrf_token %}
{{ form.media }}
{{ form.as_p }}
<br/>
<button class="btn btn-secondary"> Post </button>
</form>
</div>
update other templates such as update_post.html
TemplateDoesNotExist error...
add ckeditor in settings.py
check virtual environment
INSTALLED_APPS = [
'ckeditor',
add safe pipe, otherwise it will show all the html tags like so...
article_details.html
{{ post.body|safe }}
There are many reasons for which one can choose to hire Aerocity Call Girls for their personal satisfaction. You can look for different options from Aerocity escorts agency and choose the best one for yourself.