47 lines
934 B
Markdown
47 lines
934 B
Markdown
# simplest Django and django-rq
|
|
|
|
## How to use
|
|
|
|
To run:
|
|
`docker-compose up -d`
|
|
|
|
Site available on 8000 port.
|
|
|
|
You can make any changes in code, they will appear automatically. If you want to execute something with manage.py use:
|
|
|
|
```sh
|
|
docker-compose exec app python3 manage.py migrate
|
|
docker-compose exec app python3 manage.py makemigrations
|
|
docker-compose exec app python3 manage.py update_admin admin adminpass # create superuser
|
|
```
|
|
|
|
and so on.
|
|
|
|
## Install formatting
|
|
|
|
**Features**
|
|
|
|
- check for unsolved merge conflicts
|
|
- black formatting
|
|
- sort imports
|
|
- remove unused variables, imports, duplicates
|
|
- flake8 verification
|
|
|
|
It executes on **every** commit
|
|
|
|
```sh
|
|
pip install pre-commit flake8 black
|
|
pre-commit install
|
|
```
|
|
|
|
Apply for all files in current directory:
|
|
|
|
```sh
|
|
pre-commit run --all-files
|
|
```
|
|
|
|
If there is PEP8 errors, commit will be forbidden. To force commit use flag --no-verify:
|
|
|
|
```sh
|
|
git commit --no-verify ...
|
|
``` |