38 lines
1.3 KiB
Python
Executable file
38 lines
1.3 KiB
Python
Executable file
# Generated by Django 4.2.16 on 2024-10-21 18:39
|
|
|
|
from django.db import migrations, models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
initial = True
|
|
|
|
dependencies = []
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name="Category",
|
|
fields=[
|
|
("id", models.AutoField(primary_key=True, serialize=False)),
|
|
("name", models.CharField(max_length=200)),
|
|
("created", models.DateTimeField(auto_now_add=True)),
|
|
],
|
|
),
|
|
migrations.CreateModel(
|
|
name="Post",
|
|
fields=[
|
|
("id", models.AutoField(primary_key=True, serialize=False)),
|
|
("title", models.CharField(max_length=200)),
|
|
("content", models.TextField()),
|
|
("date", models.DateTimeField(auto_now_add=True)),
|
|
("type", models.CharField(default="news", max_length=200)),
|
|
(
|
|
"image",
|
|
models.ImageField(blank=True, null=True, upload_to="images/"),
|
|
),
|
|
("active", models.BooleanField(default=False)),
|
|
("created", models.DateTimeField(auto_now_add=True)),
|
|
("updated", models.DateTimeField(auto_now=True)),
|
|
],
|
|
),
|
|
]
|