Hi folks - I'd like to use the galleries app, but I need the description 
field to be a rich text field instead of the plain text input that it is 
right now. I tried to override the admin form widget using something along 
those <http://techstream.org/Bits/Text-Area-Widget-in-Django-Admin> lines, 
but it didn't work (screenshot 
<https://www.dropbox.com/s/fys8a4z2uc66g9u/Screenshot%202018-01-03%2014.02.43.png?dl=0>).
 
I think I see the duplicate fields because I have 2 languages in 
translations (en, ar).  Relevant snippets:


## forms.py
from mezzanine.core.forms import TinyMceWidget

class GalleryImageForm(forms.ModelForm):
  description = forms.CharField(widget=TinyMceWidget)

  class Meta:
    model = GalleryImage
    exclude = []


## admin.py
from mezzanine.core.admin import TabularDynamicInlineAdmin

class GalleryImageInline(TabularDynamicInlineAdmin):
    model = GalleryImage
    form = GalleryImageForm

class GalleryAdmin(PageAdmin):

    class Media:
        css = {"all": (static("mezzanine/css/admin/gallery.css"),)}

    inlines = (GalleryImageInline,)

admin.site.unregister(Gallery)
admin.site.register(Gallery, GalleryAdmin)

Any tips on how you'd recommend that I deal with this?

Thanks!

/majd

PS The link <http://mezzanine.jupo.org/irc/archive/> given in the IRC 
channel for the IRC archive is broken! 

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to