API Document: http://docs.jubliaagenda.apiary.io/
The frontend is written with Angular 2. See https://github.com/ZhangYiJiang/jublia-agenda/tree/master/frontend for more details.
The backend uses Django 1.10 and Django Rest Framework 3.4. On development environment by default it will use a Sqlite database, and all mails are sent to log. To run the unit tests the database user will need permission to create databases (this is not necessary for the Sqlite database).
To setup:
pyvenv venv
source venv/bin/activate
pip install -r requirements.txt
cp jublia/env.py.example jublia/env.py
then vim jublia/env.py
and update the SECRET_KEY
(use http://www.miniwebtool.com/django-secret-key-generator/)./manage.py migrate
to run the DB migrations./manage.py test backend
. Check that there are no errors. ./manage.py runserver
localhost:8000/admin
to check that Django is working properly./manage.py createsuperuser
to create a new admin accountDjango comes with a number of useful command line commands through manage.py
. In addition, Django Extensions is also installed, which means there's a number of useful commands in addition to Django's defaults. Run manage.py
without any commands to see a list.
In addition to this we also define the following commands:
seed
- seed database with fake data for testingThis command will create a new user and generate a new event agenda with tracks, speakers and sessions for testing purposes. The following options are available.
--user=None
- if specified, adds the seeded event to the user with the given email --tracks=2
- number of session tracks --speakers=5
- number of speakers --sessions=20
- number of sessions. --venues=3
- number of venuesThe sessions are randomly assigned fields, speakers and tracks. Their timing should be within office hours, but no checks for overlapping sessions is done
Deployment to the staging server is done using the included Fabric script. The included commands are
frontend
- Pull and build the frontend code
backend
- Pull and build the backend code
deploy
- Pull and deploy both the front and backend code
seed
- Runs the database seed command. Use a colon to separate the arguments, which are passed straight to the command, like this fab seed:'--sessions=30'