Answer the question
In order to leave comments, you need to log in
How to fix in Django?
There is a form
class FormCreateEdit(forms.ModelForm):
class Meta:
model = Posts
fields = [
"title",
"content",
"image",
"category",
]
<form action="." method="POST" enctype="multipart/form-data">
{% csrf_token %}
{{ form|crispy }}
<br>
<input type='submit' class='btn btn-default' value='Create'>
</form>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question