Umbara Project
You will need:
python^3.11
(seepyproject.toml
for full version)
When developing locally, we use:
editorconfig
plugin (required)poetry
(required)pycharm 2017+
orvscode
Сheck your python version (should be 3.11)
- Install poetry
pip install poetry
- Choose poetry python version 3.11
poetry env use /full/path/to/python
- Download all dependencies to mod dev
poetry install
If you only need dependencies for production, then
poetry install --only main
-
Before starting the project, you need to create an
.env
file in the directoryconfig
and fill it with the.env.template
file in the same directory -
Updating tables in a database
poetry run python manage.py migrate
- Collect all statics in staticfiles
poetry run python manage.py collectstatic --noinput
- Compile localization files
poetry run python manage.py compilemessages
- Start django server
poetry run python manage.py runserver
Create user for django admin
Attention
: This should be done after migrations
poetry run python manage.py createsuperuser
Running tests and coverage
poetry run pytest
Running Type Checker
poetry run mypy manage.py server
poetry run mypy tests
Running linter flake8
poetry run flake8 .
Compiling localization
poetry run python manage.py compilemessages