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
<VAR:PYTHON_VERSION>
. 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-dev
for 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
.env
in the form ofDATABASE_URL=mysql://user:pass@host:port/dbname
(omit:port
to use the default MySQL port). - Run the migrations
manage.py migrate
.
Check this guide.