Aldryn Addons (addon integration)¶
Its an open-source package, andis itself an addon. The addons framework is installed by default in all DivioCloud Django projects.
A project, or an addon in it, may need to specify some URL patterns.
They could simply be added to the project’s manually. However, it’salso convenient for addons to be able to configure URLs programmatically, sothat when an addon is installed, it will also take care of setting up therelevant URL configurations.
As well as indicated places for manually-added patterns, it calls and aldryn_addons.urls.i18n_patterns()
.
These functions, in ,check for and return the values in four different settings:
ADDON_URLS and ADDON_URLS_I18N¶
These are expected to be lists of URL patterns. Each addon that needs to addits own URL patterns should add them to the lists.
- settings['ADDON_URLS'].append('aldryn_django_cms.urls')
ADDON_URLS_LAST and ADDON_URLS_I18N_LAST¶
These are not lists, and only one of each can be set in any project - it’s notpossible for two applications both to specify an forexample.
django CMS sets settings['ADDON_URLS_I18N_LAST'] = 'cms.urls'
- so ina project using django CMS, no other application can use .