#saja-expo-api
Internal API for communication between the expo and myswissalps.
- virtualenv
- A file-based storage is used by default.
Create and activate a virtualenv:
virtualenv env
source env/bin/activate
Add the folder 'apps' to the path
- if virtualenvwrapper is available:
add2virtualenv apps
- without virtualenv:
echo "`pwd`/apps" > <yourvirtualenv>/<yoursitepackages>/_apps_path.pth
(or just add the path to your python-path)
Install dependencies:
pip install -r requirements/local.txt
Initialize the git repository
git init
git remote add origin [email protected]:CDE-UNIBE/saja-expo-api.git
Migrate the database and create a superuser:
python manage.py migrate
python manage.py createsuperuser
Set the environment variables:
- envs/DATABASE_URL =
sqlite:////<some-local-path>
. (For a proper database, refer to dj-database-url) - envs/API_URL =
dev.myswissalps.ch
Run the development server:
python manage.py runserver
Run the production server:
- Use (maybe symlink) the files
serverconfig/uwsgi.ini
andserverconfig/nginx-vhost.conf
- Install the crontab: resubmit.sh