daniyalzade / django_reverse_admin

Django Reverse Admin
BSD 3-Clause "New" or "Revised" License
199 stars 54 forks source link

Cannot use Summernote at inline_reverse #259

Open tschirnhausen opened 3 years ago

tschirnhausen commented 3 years ago

I have a template whose "body" attribute must be HTML content. Therefore, I use the Summernote widget to add it, as follows:

@admin.register(StoryContent)
class StoryContentAdmin(SummernoteModelAdmin):

    summernote_fields = ('body',)

Now that I am trying to use django_reverse_admin, I have changed the structure, but when using the Foreign Key names, naturally, I can't see the "body" field with the Summernote widget.

inline_type = "stacked" 
inline_reverse = ('content_es', 'content_en', 'content_pt')

So I made a template form, specifying that the "body" field should use the Summernote widget, but when it comes to using this form, I get the following error.

inline_type = "stacked"
inline_reverse = (('content_es', ModelForm), ...)

Getting: TypeError: 'ModelFormMetaclass' object is not iterable How can I specify the form or my StoryContentAdmin class to use this widget?