How to display Field Quill in Django Views?
For my forum I am trying to use Quill Rich Text editor to format my Posts and comments.
class Topic(models.Model):
title = models.CharField(max_length=70, blank=False, null=False)
description = QuillField(default="")
And managed to create some content <class 'django_quill.fields.FieldQuill'>
This is how it looks on admin form
I have tried display it in views using
<div class="">{{topic.description.html| safe}}</div>
I am using django-quill package enter link description here I have included all the style and script tags as recommended and still the styles are not applying.
Any ideas how I can display the content as is.
I have tried:
- Converting the delta type
{"ops":[{"attributes":{"bold":true},"insert":"dqwdqwdqdqdq"},{"insert":"\n"}]}
into html before saving the model. failed with errorTypeError: 'FieldQuill' object is not subscriptable
Please recommend reliable packages to convert delta to html or display the content with all formatting.
TIA