Library Development

Backend development environment

virtualenv

Virtualenv is probably what you want to use during development. Once you have virtualenv installed, just fire up a shell and create your own environment.

virtualenv venv
source venv/bin/activate
pip install -r requirements.dev.txt

Installing test data

python manage.py migrate
python manage.py loaddata sites/dev/fixtures/data.json

Running backend dev server

python manage.py runserver

An instance of django dev server will be listening on http://localhost:8000/ . Now you can login into django admin interface http://localhost:8000/admin/ with username test and password test.

Frontend development environment

Fronted source files located under the frontend folder.

cd frontend

Installing dependencies

npm install

Running webpack dev server

npm run server:dev:hmr

Now webpack dev server will be listening on http://localhost:3000/ .

Building frontend files

npm run build:prod

Running tests

Running backend tests

python manage.py test

Test it all

You need to know at least one command; the one that runs all the tests:

tox