From b03c816fdacbd89c9fcc288a937cfc44faa60cfe Mon Sep 17 00:00:00 2001 From: Christian Glatthard Date: Thu, 13 Aug 2015 17:40:58 +0200 Subject: [PATCH] extend django setup instructions --- docs/install/installation.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/docs/install/installation.md b/docs/install/installation.md index 292d70f..0c9e607 100644 --- a/docs/install/installation.md +++ b/docs/install/installation.md @@ -285,6 +285,25 @@ $ cd backends && pip install -e . && cd .. ##### 6.3.3 Making the application ready +As we are using the `django-admin-conf-vars`, we need to watch out to follow some required additional steps. You can find more details about this in the (official pypi registry entry of the package)[https://pypi.python.org/pypi/django-admin-conf-vars/]. + +First of we need to comment out some lines in the source. + +Open `ipynbsrv/settings.py` with the editor of your choice, and comment out the following line: + +``` +VARS_MODULE_PATH = 'ipynbsrv.core.conf' +``` + +Next up, open `ipynbsrv/core/models.py` and comment out the last lines, where all the signals get imported: + +``` +# make sure our signal receivers are loaded +from ipynbsrv.core.signals import backend_users, backend_groups, \ + collaboration_groups, container_images, container_snapshots, containers, \ + groups, notifications, shares, users +``` + After having completed the above preparation steps, the next few commands will look familiar to everyone already having used Django in the past. They are all about initializing the Django application and should be run in the repository root. ```bash @@ -292,6 +311,13 @@ $ python manage.py makemigrations $ python manage.py migrate ``` +Now you have to reopen `ipynbsrv/settings.py` and `ipynbsrv/core/models.py` again, undo your changes (remove the #), and run the migrations again: + +```bash +$ python manage.py makemigrations +$ python manage.py migrate +``` + As we are using `LESS` to produce `CSS` and `bower` to manage external dependencies, you need to compile the styles and install the deps (like `jQuery` etc.): ```bash