Getting started

The following we present a short guide on how to get started with OLDP. If you encounter any problems, do not hesitate to write an issue or contact us via email or Twitter.

Install dependencies

apt-get install -y $(cat apt-requirements.txt)
pip install -r requirements.txt
npm install

Run tests

Automated tests use Django`s testing API. If you are not familiar with Django have a look at their extensive documentation first.

For testing we use settings slightly different to development and production. For instance, SQLite is used as database to speed up testing. To use the testing settings, set the configuration variable as following:


Next, you can run either all or specific tests:

# all tests
./ test

# tests from the laws app
./ test oldp.apps.laws.tests

# tests only views
./ test --tag=views

Some tests require external services (Elasticsearch or web access). To enable or disable them, set the configuration variables:



To get the dependency services (database, search, cache) running we suggest to use Docker Compose. Compose is a tool for defining and running multi-container Docker applications.

Run server manually

Run webpack to create the website assets:

npm run-script build

Set the right environment:


Before running the server for the first time you need to set up the database schema and collect all static files to a single location.

./ migrate
./ collectstatic 

Now you are ready to go:

./ runserver

An admin account can be created using:

./ createsuperuser