I'm new to Django and trying to figure out how to override all of my textarea fields in my Admin Model Forms. I saw this in the django-summernote docs:
from django_summernote.admin import SummernoteModelAdmin
# Apply summernote to all TextField in model.
class SomeModelAdmin(SummernoteModelAdmin): # instead of ModelAdmin
...
But I'm not sure what should replace the ellipses. Is there a way to do this for all textareas in Admin at once or does this need to be applied to each Model?
Thanks!
Actually, ellipses
means custom admin codes for your models.
https://docs.djangoproject.com/en/1.8/ref/contrib/admin/#modeladmin-options
So, if you don't have any custom values for your ModelAdmin
, then just put admin.site.register(Question, SummernoteModelAdmin)
without own class declaration.