mirror of
https://github.com/ada-dmitry/Project_WEB.git
synced 2026-09-24 08:00:20 +00:00
- 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.
37 lines
1.3 KiB
Python
37 lines
1.3 KiB
Python
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'],
|
|
},
|
|
),
|
|
]
|