- Custom and configurable
app
template - Fully typed
Django
- Async ORM (
Django 4.1+
) - aiogram3 as Telegram Bot API
- pre-commit hooks for code formatting and linting
-
git clone https://github.com/MaximZayats/aiogram-django-template
-
pip install -r requirements.txt
pip install -r requirements-dev.txt
-
- Copy
.env.dist
- Rename it to
.env
- Insert your values
- Copy
-
make makemigrations
orpython manage.py makemigrations
make migrate
orpython manage.py migrate
-
make run-bot
orpython -m app.delivery.bot
-
- Collect static:
python manage.py collectstatic
- Run server (local):
make run-local-server
orpython -m uvicorn app.delivery.web.asgi:application
- Run server (prod):
make run-prod-server
- Collect static:
-
make -j3 run-bot run-local-server
-
python manage.py startapp APP_NAME
- Apps are created using a template:
app/config/__app_template__
- You can use your template:
python manage.py startapp APP_NAME --template TEMPLATE_PATH
- Or without template:
python manage.py startapp APP_NAME --no-template
- Apps are created using a template:
-
- Register app in
app/config/application.py
- Register app in
-
- Run bot
- Type
/apps
:- You should get a list of all your apps
- Type
/APP_NAME
:- You should get a message from your app