my model.py
from django.contrib.auth.models import User from ckeditor.fields import RichTextField #(this field imported) # Create your models here. class Blog_post(models.Model): title = models.CharField(max_length=200) body = models.RichTextField(blank=True) #(this field in body is not defined) author = models.ForeignKey(User,on_delete=models.CASCADE)
and CKEditor is installed I followed a tutorial same as but in my case whenever I enter make migration it says the name RichTextField is not defined and I don't know how to fix it any kind of help will be apriciated
I already fixed it I was using models.RichTextField() error is throw because RichTextField is not defined in models you should only use tex=RichTextField() it was a typo – baibars313 just now
models.RichTextField()
1.4m articles
1.4m replys
5 comments
56.9k users