Load djangoldp conguration from YAML file
This MR is a breaking change and should publish a new major release.
This will break compatibility with djangoldp packages
if not handle properly.
The future documentation to use djangoldp is here: https://git.startinblox.com/djangoldp-packages/djangoldp/blob/beta/docs/setup_server.md
The major changes consist of:
- Dynamically loading
djangoldp
settings from asettings.yml
- Using custom default settings for
djangoldp
- Adding the ability to reference custom parameters from the
djangoldp packages
before the server starts including MIDDLEWARES and INSTALLED_APPS (check new settings on djangoldp-account beta branch)
As stated in #220 (closed) the resolution order of the configuration is:
- Core default setting
- Packages settings
- YAML config file
Each stage overriding parameters of the previous one.
Note that request of @calummackervoy and @jbpasquier from there: #220 (comment 28777) is still pending and I opened a dedicated issue for it. Today there isn't any project using this, so you tell me if this feature must be implemented before merging this MR.
@balessan @calummackervoy @jbpasquier : I need your insights on this. I can't be sure that it covers all requirements netiher that I tested everything. But I have now time to but massive rework if you want to. Which makes this MR realisitic now. We can plan a call to speak about it as it may be difficult to read a MR that big.
djangoldp
with djangoldp_account
from beta
branches
How to test In a virtualenv or a container, install the server:
$ pip install git+https://git.startinblox.com/djangoldp-packages/djangoldp.git@beta
Create a new project:
$ cd /tmp
$ djangoldp startproject myproject
$ cd myproject
Add djangoldp-account@beta
in dependencies and packages of your server config:
$ vim settings.yml
dependencies:
- git+https://git.startinblox.com/djangoldp-packages/djangoldp-account.git@beta
ldppackages:
- djangoldp_account
Install dependencies:
$ djangoldp install
Configure and launch the server:
$ djangoldp configure
$ djangoldp runserver
Then connect on http://localhost/admin/ to check your server content.