Add initial Django project structure with cleaning app

- Created .gitignore to exclude Python-generated files and virtual environments.
- Added .python-version to specify Python version 3.13.
- Implemented models for Client, Brigade, Service, Order, and CompletedWork.
- Created Django admin configurations for managing models.
- Added management command to seed the database with test data.
- Created initial migrations for the models.
- Developed views and templates for listing and detailing orders, clients, and brigades.
- Set up URL routing for the cleaning app.
- Configured Django settings and WSGI/ASGI entry points.
- Added basic test structure in tests.py.
- Included project metadata in pyproject.toml and uv.lock.
This commit is contained in:
Dmitry
2026-05-16 16:09:37 +03:00
commit 97591a71ea
30 changed files with 867 additions and 0 deletions
+36
View File
@@ -0,0 +1,36 @@
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('cleaning', '0002_services'),
]
operations = [
migrations.CreateModel(
name='Order',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('date', models.DateField(verbose_name='Дата')),
('start_time', models.TimeField(verbose_name='Время начала')),
('end_time', models.TimeField(verbose_name='Время окончания')),
('client', models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
to='cleaning.client',
verbose_name='Клиент',
)),
('brigade', models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
to='cleaning.brigade',
verbose_name='Бригада',
)),
],
options={
'verbose_name': 'Заказ',
'verbose_name_plural': 'Заказы',
'ordering': ['date'],
},
),
]