-
-
Notifications
You must be signed in to change notification settings - Fork 623
Open
Description
I am using widget on my forms and anytime I edit the form, I get this in my tag's field
[<Tag: afajf>, <Tag: fjkf>, <Tag: trial>]
Here is my form:
class AbstractForm(forms.ModelForm):
class Meta:
model = Abstract
fields = [
'abstract_title',
'abstract',
'keywords',
'attachment',
'track',
'presentation_type',
]
widgets = {
'abstract_title': forms.TextInput(attrs={'class': 'form-control'}),
"abstract": CKEditor5Widget(
attrs={"class": "django_ckeditor_5"}, config_name="extends"),
# 'abstract': forms.Textarea(attrs={'class': 'form-control'}),
'keywords': forms.TextInput(attrs={'class': 'form-control'}),
'attachment': forms.FileInput(attrs={'class': 'form-control'}),
'track': forms.Select(attrs={'class': 'form-select'}),
'presentation_type': forms.Select(attrs={'class': 'form-select'}),
}
and here is my template:
<div class="card mb-4 shadow-sm">
<div class="card-header bg-primary text-white">
<h5 class="mb-0">Abstract Details</h5>
</div>
<div class="card-body">
{{ abstract_form.media }}
{% for field in abstract_form %}
<div class="mb-3">
{{ field.label_tag }}
{{ field }}
{% if field.errors %}
<div class="invalid-feedback d-block">
{% for error in field.errors %}
{{ error }}
{% endfor %}
</div>
{% endif %}
</div>
{% endfor %}
</div>
</div>
Metadata
Metadata
Assignees
Labels
No labels