Welcome to the Task Manager project! This repository contains a web application built with Django that allows users to manage tasks efficiently by creating, updating, assigning, and organizing them with labels and statuses. It supports user authentication, role-based permissions, and detailed task tracking.
To run this project, you need to have the following software installed:
- Python >=3.10
- Uv
- Redis server (for Channels and Celery)
Create .env file with code kind of:
webserver=127.0.0.1
DEBUG=True
SECRET_KEY=secret_key
DATABASE_URL=sqlite:///database_name.db
DJANGO_SUPERUSER_USERNAME=superuser
DJANGO_SUPERUSER_EMAIL=superuser@example.com
DJANGO_SUPERUSER_PASSWORD=password
rollbar_token=rollbar_token
CHANNEL_USE_IN_MEMORY=0
CELERY_BROKER_URL=redis://127.0.0.1:6379/1
CELERY_RESULT_BACKEND=redis://127.0.0.1:6379/1
CELERY_TASK_ALWAYS_EAGER=1
CELERY_TASK_EAGER_PROPAGATES=1To set up the project, navigate to the project directory and run the following commands:
make installmake migratemake dev
# in separate terminals
make celery-worker
make celery-beat
# (optionally) make bot
# or run everything in one terminal
# (press Ctrl+C to stop all processes; launches bot if TELEGRAM_BOT_TOKEN is set)
make dev-all- The app reads
STATIC_ROOTfrom the environment. If not set, it defaults to./staticfiles. - Recommended on server:
- Set in
.env:STATIC_ROOT=/var/www/task-manager/staticfiles - Update Nginx:
location /static/ { alias /var/www/task-manager/staticfiles/; } - Then run:
uv run python manage.py collectstatic --noinputand reload Nginx.
- Set in
- Create the bot via BotFather and add the token to
.envasTELEGRAM_BOT_TOKEN. - Generate a personal access token on the
/telegram/page after logging in. - Run the bot manually (
make bot) or rely onmake dev-all(if the token is set). - In Telegram, send the generated token to the bot and use commands like
/tasks,/complete <id>,/notifications.
- Obtain a token via
POST /api/auth/token/withusernameandpassword. - Use the token in requests:
Authorization: Token <token>. - Task endpoints available at
/api/tasks/(CRUD +POST /api/tasks/{id}/complete/).