I wanted to add tinymce in my admin forms without having to change the model and implementing it like this:
from tinymce.widgets import TinyMCE
from django.db import models
class EventAdmin(admin.ModelAdmin):
formfield_overrides = {
models.TextField: {'widget': TinyMCE(attrs={'cols': 10, 'rows': 30})},
}
admin.site.register(Event, EventAdmin)
works but the attributes are overwritten with the ones from my settings.py file.
Is there a way to use this with formfield_overrides or do I have to change all my model fields?
I wanted to add tinymce in my admin forms without having to change the model and implementing it like this:
works but the attributes are overwritten with the ones from my settings.py file. Is there a way to use this with formfield_overrides or do I have to change all my model fields?