Sigma - Backend
===============
To quickly setup a working testing version of the backend, just use the command:
manage.py install
And then to run the server :
manage.py run-data-server
If you want to use the vagrant setup, you don't have to install python libraries.
Please see the provisioning repository.
Requirements.
On Debian-based distribution, you will need the following librairies:
apt-get install python-dev libmysqlclient-dev libjpeg-dev python3.5-dev
Python 3 is required.
We recommend to use a virtualenv for python.
Follow these instructions to setup the project.
First, configure the manager editing the settings.py file. You'll need to provide the name of your python and pip programs. If you're on a campus, you can also add a proxy setting.
Then, install dependances
manage.py install-deps
Finally, initialize the database, and load static files
manage.py init
The manage.py
file provides some useful tools. Here is how to use it :
To start the data server, i.e. the one containing the database/django stuff
manage.py run-data-server
To start the notification server, i.e. the one which clients will open websockets to, use
manage.py run-push-server
To use the Django manager, simply use manage.py django [...]
followed by the parameters you want to use
For example you could do manage.py django migrate
If you'd like to test things out, fill the database with some random fixtures using
manage.py fixtures
You'll be provided with a super-user :
Email: admin@sigma.fr
Password: admin
An OAuth client application is also created (see below for further information), with data:
clientId
:bJeSCIWpvjbYCuXZNxMzVz0wglX8mHR2ZTKHxaDv
clientSecret
:XjbfZS6Apq05PDTSL4CoFHGo7NsKVAa1XMVrVElk5N1t0dOSyqxrHPff6okAi6X6Du9XxrK4dl0mLQ0YlscJsjnL5IKhQagQdGv2SgumhYRFaMi6LtHNPXicmMr8oLdy