31 lines
1.1 KiB
Markdown
31 lines
1.1 KiB
Markdown
# CNA Charting Application
|
|
|
|
### Prerequisites
|
|
|
|
- Python 3.9.5
|
|
- Pipenv
|
|
- Install [direnv](https://direnv.net/)
|
|
- In the project root create a file `.envrc` with the following two lines:
|
|
-- `export SECRET_KEY="longrandomstringofcharacters"`
|
|
-- `export DEBUG=True`
|
|
|
|
### Python environment and packages:
|
|
|
|
- In the project root run: `pipenv shell` to get into the python virtualenvironment
|
|
- Run: `pipenv install` to install dependencies (e.g. Django)
|
|
|
|
### Setting up the database and dev-server:
|
|
|
|
- Run: `python manage.py makemigrations` to create database migrations
|
|
- Run: `python manage.py migrate` to create the database with migration schemas
|
|
- Run: `python manage.py createsuperuser` and follow prompts to create a superuser in the database.
|
|
|
|
### Running the server:
|
|
|
|
- Run: `python manage.py runserver` and navigate to [localhost](http://localhost:8000/admin/)
|
|
|
|
### Running the server with livereload for Django template files:
|
|
|
|
- Run: `python manage.py livereload` in one terminal process
|
|
- Run: `python manage.py runserver` in another terminal process and navigate to [localhost](http://localhost:8000/admin/)
|