Home:ALL Converter>Django-Summernote: How do I override the admin form textareas with the Summernote widget?

Django-Summernote: How do I override the admin form textareas with the Summernote widget?

Ask Time:2015-05-20T10:34:18         Author:William

Json Formatter

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!

Author:William,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/30339346/django-summernote-how-do-i-override-the-admin-form-textareas-with-the-summernot
lqez :

Actually, ellipses means custom admin codes for your models.\nhttps://docs.djangoproject.com/en/1.8/ref/contrib/admin/#modeladmin-options\n\nSo, if you don't have any custom values for your ModelAdmin, then just put admin.site.register(Question, SummernoteModelAdmin) without own class declaration.",
2015-06-17T16:09:48
yy