Placement of djangocms_text_ckeditor in INSTALLED_APPS

23 views
Skip to first unread message

John-Scott

unread,
Nov 11, 2014, 5:39:39 PM11/11/14
to django-cms...@googlegroups.com
Have been reviewing and editing the documentation and noticed that the docs (here and here) claim that djangocms_text_ckeditor must be installed *before* 'cms' in INSTALLED_APPS. djangocms-installer also seems to follow this advice:

INSTALLED_APPS = (
   
'djangocms_admin_style',
   
'djangocms_text_ckeditor',
   
...snip...
   
'cms',
   
...snip...
)

Anyone remember why it should be placed above 'cms'? The note was introduced in this commit, but the commit message is unhelpful: "updating readme".

I ask because this advice doesn't appear to be necessary. I'm using the plugin in a project where it is listed well below 'cms' without apparent issue. However, in the case of custom user models, the default ordering will likely lead to errors. For example, if your settings look like:

    'djangocms_admin_style',
   
'djangocms_text_ckeditor',
   
...snip...
   
'accounts', # Custom user model defined here
   
'cms',

...this will break because the plugin pool magic triggers an import of 'cms' code, which happens before the app registry has loaded the custom 'accounts' app.
Instead, users would have to reorder them with the custom app before both:

    'djangocms_admin_style',
   
...snip...
   
'accounts', # Custom user model defined here
   
'djangocms_text_ckeditor',
   
'cms',


Is the advice no longer valid and we can remove it from the docs? 

Thanks,
John-Scott
Reply all
Reply to author
Forward
0 new messages