Usage¶
django-app-enabler
allow application supporting Addon configuration specification to be installed and configured automatically in the current django project.
Installation¶
pip install django-app-enabler
Commands¶
apply <path_to_json> <path_to_json>: Apply configuration from json files
enable <module_name>: Configure an application
install <package-name>: Install and configure an application
Sample execution flow¶
django-enabler install djangocms-blog~=1.2.1
python manage.py migrate
After this the django application is configured and functional.
Additional configuration steps might be required according to the application features and support level and must be documented by the application itself.
Alternatively you can execute the module itself:
python -mapp_enabler install djangocms-blog~=1.2.1
Application configuration¶
The core of django-app-enabler
is its Django configuration patching engine.
The general concept is that once a django package is installed, app-enabler
can be run from the project root and
the project is automatically updated with the minimal configuration required by the application to run (or any superset
of this definition).
Applied configurations are declared by the target application in a addon.json file included in the python package.
Example:
django-enabler enable djangocms_blog
See Limitations for limitations and caveats.
Apply configurations¶
django-app-enabler
can also apply configuration from arbitrary json files not included in any Django application.
Each configuration file must comply with Extra configuration files specifications.
Note
Django settings
and urlconf
are patched unconditionally.
No attempt to verify that applications declared in installed_apps
or added to the urlconf
are available in the virtualenv is made.
Example:
django-enabler apply /path/to/config1.json /path/to/config2.json
See Limitations for limitations and caveats.
Application Installation¶
As a convenience django-app-enabler
can execute pip install
on your behalf, though step this is not required.
The install
command will both install the package and enable it.
Installation is executed via the install
command which a
django-enabler install djangocms-blog~=1.2.0
Note
django-app-enabler
is not intended as a replacement (or sidekick) of existing package / dependencies manager.
The installation step is only intended as a convenience command for those not sticking to any specific workflow.
If you are using anything than manual pip
to install packages, please stick to it and just use Application configuration.