python - Unable to include django-summernote features -
i trying add django-summernote feature form unable that. here code forms.py
class homeform(forms.modelform): post = forms.charfield(widget=forms.textinput( attrs={ 'class': 'form-control', 'placeholder': 'write post here...', 'post': summernoteinplacewidget(), } )) class meta: model = post fields = ('post',)
models.py
class post(models.model): post = models.textfield() user = models.foreignkey(user) created = models.datetimefield(auto_now_add=true) updated = models.datetimefield(auto_now=true)
template
status
{% csrf_token %} {{ form.post }}submit
{{ text }}
{% post in posts %}{{ post.post }}
posted {{ post.user.get_full_name }} on {{ post.created }}
{% endfor %}and included summernote url in urls.py
Comments
Post a Comment