项目
在 GitHub 查看
tough-dev-school/education-backend
关于
基于 Django 的学习管理系统后端。
网站与应用开发实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文Backend for tough-dev.school
Django-based production project, integrated with Tinkoff, Dashamail, Postmark, S3 and telegram. Frontend is built on vue.js in the separate repo.
Configuration
Configuration is stored in src/core/.env, for examples see src/core/.env.ci
Installing on a local machine
This project requires python 3.14. Deps are managed by uv.
Install requirements:
uv sync
Configure postgres and redis. It's convenient to use docker and docker-compose:
docker compose up -d
If you don't have access to de-anonymized db image use postgres:13.6-alpine in docker-compose.yml instead:
postgres:
image: postgres:13.6-alpine
...
Run the server:
cp src/core/.env.ci src/core/.env
uv run python src/manage.py migrate
uv run python src/manage.py createsuperuser
make server
Testing:
# run lint
make lint
# run unit tests
make test
Backend Code requirements
Style
- Obey django's style guide.
- Configure your IDE to use
rufffor checking your python code. For running linters manualy, domake lint - Prefer English over your native language in comments and commit messages.
- Commit messages should contain the unique id of issue they are linked to (refs #100500)
- Every model and a model method should have a docstring.
Code organisation
- KISS and DRY.
- Obey django best practices
- If you want to implement some business logic — make a service for that. Service examples: UserCreator, OrderCreator
- No logic is allowed within the views or templates. Only services and models.
- Use PEP-484 type hints when possible.
- Prefer Manager methods over static methods.
- Do not use signals for business logic. Signals are good only for notification purposes.
- No l10n is allowed in python code, use django translation.
探索相关项目
加载中…