The project follows the GoodCode.io guide on storing configuration in the environment and the 12factor methodology. Thus, each deployment needs to have its own isolated environment and its own configuration, which shall be stored in the .env file.
- Setup and activate a virtual environment with
python3.6. A useful guide on how to do this can be found here. - Install a MySQL client library for your system (
sudo apt install default-libmysqlclient-devfor Linux). - Run
pip install -e .if in a production environment, orpip install -e .[dev]if in a development environment. - Copy env.sample to .env and edit .env to customize the configuration for your local deployment.
- Using MySQL for the database is highly recommended. Create a database and a user and write the credentials to
.envin the form ofDATABASE_URL=mysql://user:pass@host:port/dbname(omit:portto use the default MySQL port). - Run the migrations
manage.py migrate.
Check this guide.