This project was created as part of the "Python Developer" course on the Hexlet educational platform.
Task manager is a small web application based on the Python framework Django, designed for managing tasks in a small team.
This project applies the fundamental principles of modern web development based on the MVC architecture, including routing, request handling, template creation, and database interaction using the built-in ORM.
Django's built-in ORM allows for consistent interaction with the project's databases, PostgreSQL and SQLite.
Bootstrap is used together with the built-in DjangoTemplates engine to create the appearance of the web application.
- Create tasks;
- Assign executors;
- Set task status and assign labels;
- Filter tasks by one or more criteria;
- User authentication and registration.
- Register in the application:
- Use your first name, last name, and username.
- Create a strong password.
- Log in:
- Use your username and password.
- "Users" tab:
- View team members.
- Edit your own information.
- "Statuses" tab:
- View the list of statuses.
- View and edit statuses.
- "Labels" tab:
- View the list of labels.
- View and edit labels.
- "Tasks" tab:
- View the list of tasks.
- Filter the list of tasks by one or more criteria.
- Get detailed information about each task.
- Edit tasks.
- Create tasks, assign executors, and set status and labels.
- Python
- Django
- PostgreSQL
- Bootstrap 5
- Rollbar
- Whitenoise
Check out the demo version deployed on Render: https://python-project-52-glfi.onrender.com/
Before starting the installation, make sure you have the following components installed:
- Python (version 3.11 or higher)
- PIP (version 24.0 or higher)
- Poetry (Python package installer)
- Git (version 2.43 or higher)
- PostgreSQL (version 16.2 or higher), optional.
Execute the following command in your terminal to clone the repository to your local machine:
git clone git@github.com:Asgef/python-project-52.git
Navigate to the project directory and execute the command to install dependencies:
make install
Create a .env file in the root directory of the project and specify the necessary environment variables, for example:
SECRET_KEY = '{your secret key}'
# optional
DATABASE_URL = postgresql://{provider}://{user}:{password}@{host}:{port}/{db}
POST_SERVER_ITEM_ACCESS_TOKEN='{your secret key}'
Perform migrations and create a directory for static files:
make build
Launch the web application using the following command:
make start
Verification: Open a web browser and navigate to http://localhost:8000 to verify that the application has been successfully installed and is running.
This project is configured to use SQLite in the development environment and PostgreSQL in the production environment. If you need to use PostgreSQL during development, set the DATABASE_URL variable in your .env file and update the entry in settings.py:
DATABASES = {
'default': dj_database_url.config(
default=os.getenv('DATABASE_URL')
)
}
You can use the error monitoring service.
-
Set the POST_SERVER_ITEM_ACCESS_TOKEN variable in your .env file. The token will be provided to you during registration.
-
In settings.py, set the variable:
ROLLBAR = { 'access_token': os.getenv('POST_SERVER_ITEM_ACCESS_TOKEN'), 'environment': 'development' if DEBUG else 'production', 'branch': 'main', 'root': 'BASE_DIR', }
-
Navigate to the project directory, and in the terminal, run the command poetry shell.
-
Start the Python REPL and execute the following commands:
from dotenv import load_dotenv load_dotenv() rollbar.init( access_token='your_access_token', environment='testenv', code_version='1.0' )