I created a model
class Post(models.Model):
title = models.TextField()
body = models.TextField()
and created forms.py as
class PostForm(forms.ModelForm):
class Meta:
model = Post
fields = ('title', 'body',)
I have added tinymce and it works in admin but doesn't render it in template. I tried to override the form through a variant of forms.py as
class PostForm(forms.ModelForm):
title = forms.TextField(widget=TinyMCE(attrs={'cols': 100, 'rows': 10})
class Meta:
model = Post
fields = ('title', 'body',)
but it doesn't work . Thanks in advance