56 lines
2.2 KiB
Python
56 lines
2.2 KiB
Python
|
# Generated by Django 5.1 on 2024-08-21 13:20
|
||
|
|
||
|
import django.db.models.deletion
|
||
|
from django.conf import settings
|
||
|
from django.db import migrations, models
|
||
|
|
||
|
|
||
|
class Migration(migrations.Migration):
|
||
|
|
||
|
dependencies = [
|
||
|
('cmsMain', '0004_variable'),
|
||
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||
|
]
|
||
|
|
||
|
operations = [
|
||
|
migrations.CreateModel(
|
||
|
name='Feedback',
|
||
|
fields=[
|
||
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||
|
('email', models.EmailField(max_length=254, verbose_name='Почта')),
|
||
|
('name', models.CharField(max_length=50, verbose_name='Имя')),
|
||
|
('message', models.TextField(verbose_name='Сообщение')),
|
||
|
],
|
||
|
options={
|
||
|
'verbose_name': 'Обращение',
|
||
|
'verbose_name_plural': 'Обращения',
|
||
|
},
|
||
|
),
|
||
|
migrations.CreateModel(
|
||
|
name='File',
|
||
|
fields=[
|
||
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||
|
('name', models.CharField(max_length=50, verbose_name='Имя')),
|
||
|
('value', models.FileField(upload_to='files', verbose_name='Значение')),
|
||
|
],
|
||
|
options={
|
||
|
'verbose_name': 'Файл',
|
||
|
'verbose_name_plural': 'Файлы',
|
||
|
},
|
||
|
),
|
||
|
migrations.CreateModel(
|
||
|
name='Post',
|
||
|
fields=[
|
||
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||
|
('title', models.CharField(max_length=100, verbose_name='Название')),
|
||
|
('content', models.TextField(verbose_name='Содержимое')),
|
||
|
('created_at', models.DateTimeField(auto_now_add=True)),
|
||
|
('author', models.ForeignKey(editable=False, on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL, verbose_name='Автор')),
|
||
|
],
|
||
|
options={
|
||
|
'verbose_name': 'Пост',
|
||
|
'verbose_name_plural': 'Посты',
|
||
|
},
|
||
|
),
|
||
|
]
|