Request for comment - Plugin Dependency Policies for django CMS Developers #7096
Replies: 4 comments 3 replies
-
In example 1 (CMS plugin) you propose to add a layer to wrap the hard-coded In my opinion, even though this is well intended, it will result in wrappers which only offer the smallest common denominator. It might be that those libraries implement different fields and/or methods which then are available to neither of the plugins. This in my opinion will make development harder, rather than simpler. And btw. if you look at djangocms-cascade, there I make intensive use of internal dependencies. For instance, its own Just my two cents... |
Beta Was this translation helpful? Give feedback.
-
one comment concerning Unregister Plugins and Application Toolbars: Plugins can easily be hidden when using the I really like the "swappable model" approach as kind of a default one, as for now, I dont use any third party plugins...right because of that. Would the developer need to configure |
Beta Was this translation helpful? Give feedback.
-
This policy was unanimously approved by the Tech Committee (see meeting logs) |
Beta Was this translation helpful? Give feedback.
-
Just introduced this to djangocms-snippet (djangocms-static-ace), partially to djangocms-frontend (djangocms-static-ace, djangocms-icon) 😎 Still looking for help on how to make the Django-filer dependency swappable in djangocms-frontend ... |
Beta Was this translation helpful? Give feedback.
-
DISCLAIMER: This RFC was created by @macolo
Intro
Why these policies?
Who is this for?
Proposed Principles
TitleMeta
andPageMeta
models should be swappable.Problem Statement /Painpoints
It's cumbersome to work around hard-coded package functionality and dependencies
FilerImageField
which cannot be replaced.FilerImageField
which cannot be replaced.Solution Approaches
Unregister Plugins and Application Toolbars
admin.py
file (preferrably just before registering your replacingModelAdmin
class)cms_menus.py
fileA note about overriding django application (non-plugin) models:
ModelAdmin
classes (example). A project developer can unregister the package'sModelAdmin
, inherit from it, change it and then register their ownModelAdmin
class.views.py
) cannot be overridden, so in most cases application packages source code will have to be copied anyway.Swappable Models in pypi packages
field_name = None
).Use pypi optional dependencies
Split functionality into completely separate repositories
Beta Was this translation helpful? Give feedback.
All reactions