
Django
- 13 ответов
- 0 вопросов
7
Вклад в тег
from ckeditor.widgets import CKEditorWidget
from django import forms
class PostEditForm(forms.Form):
content = forms.CharField(widget=CKEditorWidget, label='')
<form ...>
{{ post_form.media }}
...
</form>
def view(request):
post_form= PostEditForm(request.POST)
context = {
"post_form" : post_form,
}
return render(request, 'template.html', context)