Add development environment docs in README

This commit is contained in:
Midgard 2020-07-25 12:40:57 +02:00
parent 8d17100677
commit 829b454bd9
Signed by: midgard
GPG Key ID: 511C112F1331BBB4
1 changed files with 27 additions and 1 deletions

View File

@ -1 +1,27 @@
# KeRS - Kelder Registratie Systeem
# KeRS - Kelderregistratiesysteem
## Development
Install Python and virtualenv if not already available.
Choose between:
* SQLite3 (easier to set up, works because we don't do advanced DB shizzlery or custom SQL yet)
* MySQL/MariaDB (used in production, less chance of weird bugs due to compatibility problems between SQLite3 and MariaDB)
If you choose SQLite3, set the environment variable `KERS_DB_BACKEND` to sqlite3. To do so, you can
add `export KERS_DB_BACKEND=sqlite3` to your shell's init file (e.g. `~/.bashrc`) and restart your
shell.
If you choose MySQL/MariaDB, set up the server, and look in `KeRS/settings.py` for the possible
environment variables you can set (e.g. `DATABASE_NAME`).
Set up the development environment:
```bash
python -m virtualenv venv
venv/bin/pip install -r requirements
make migrate
```
To run the development server:
```bash
make
```