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
@@ -0,0 +1,42 @@
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('cleaning', '0003_orders'),
]
operations = [
migrations.CreateModel(
name='CompletedWork',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('area', models.DecimalField(decimal_places=2, max_digits=8, verbose_name='Фактическая площадь (м2)')),
('order', models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
to='cleaning.order',
verbose_name='Заказ',
)),
('service', models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
to='cleaning.service',
verbose_name='Услуга',
)),
],
options={
'verbose_name': 'Выполненная работа',
'verbose_name_plural': 'Выполненные работы',
},
),
migrations.AddField(
model_name='order',
name='services',
field=models.ManyToManyField(
through='cleaning.CompletedWork',
to='cleaning.service',
verbose_name='Услуги',
),
),
]