Question

I want to allow the users of a django-CMS to edit the background image in one of my CMS_TEMPLATES using the filer admin. How can I achieve this in a clean way, but with minimum of code and database tables?

My current solution is to (mis-)use the cmsplugin_filer_file by writing a custom template for it. The disadvantage is that I'll maybe want to use this plugin in a different way one day, and I think one cannot have several templates for one plugin.

A cleaner alternative would be to write a custom cmsplugin with a model containing a FilerFileField and nothing else. But this will require more lines of code and will create a new database table.

Is there a better solution which I didn't think of yet?

I hope, this question can be answered, not just discussed...

Était-ce utile?

La solution

Maybe have a look at page extensions. This a new 3.0 feature:

http://django-cms.readthedocs.org/en/develop/extending_cms/extending_page_title.html

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top