mirror of
https://github.com/ada-dmitry/Project_WEB.git
synced 2026-09-24 08:00:20 +00:00
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:
@@ -0,0 +1,47 @@
|
||||
import django.db.models.deletion
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = []
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Client',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('full_name', models.CharField(max_length=200, verbose_name='ФИО')),
|
||||
('address', models.CharField(max_length=300, verbose_name='Адрес')),
|
||||
('phone', models.CharField(max_length=20, verbose_name='Телефон')),
|
||||
('preferred_time', models.CharField(
|
||||
choices=[('morning', 'Утро'), ('day', 'День'), ('evening', 'Вечер'), ('any', 'Не важно')],
|
||||
default='any',
|
||||
max_length=10,
|
||||
verbose_name='Предпочтительное время',
|
||||
)),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'Клиент',
|
||||
'verbose_name_plural': 'Клиенты',
|
||||
'ordering': ['full_name'],
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Brigade',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('name', models.CharField(max_length=100, verbose_name='Название')),
|
||||
('supervisor', models.CharField(max_length=200, verbose_name='Руководитель')),
|
||||
('employee_count', models.PositiveIntegerField(verbose_name='Количество сотрудников')),
|
||||
('specialization', models.CharField(max_length=200, verbose_name='Специализация')),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'Бригада',
|
||||
'verbose_name_plural': 'Бригады',
|
||||
'ordering': ['name'],
|
||||
},
|
||||
),
|
||||
]
|
||||
Reference in New Issue
Block a user