generated from westfarn/web_django_template
37 lines
1.3 KiB
Python
37 lines
1.3 KiB
Python
# Generated by Django 6.1 on 2026-08-26 11:38
|
|
|
|
import django.db.models.deletion
|
|
import uuid
|
|
from django.conf import settings
|
|
from django.db import migrations, models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
initial = True
|
|
|
|
dependencies = [
|
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name='Post',
|
|
fields=[
|
|
('created_at', models.DateTimeField(auto_now_add=True)),
|
|
('updated_at', models.DateTimeField(auto_now=True)),
|
|
('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
|
|
('title', models.CharField(max_length=200)),
|
|
('slug', models.SlugField(max_length=220, unique=True)),
|
|
('excerpt', models.TextField(blank=True)),
|
|
('body', models.TextField()),
|
|
('is_published', models.BooleanField(default=False)),
|
|
('published_at', models.DateTimeField(blank=True, null=True)),
|
|
('author', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='blog_posts', to=settings.AUTH_USER_MODEL)),
|
|
],
|
|
options={
|
|
'ordering': ['-published_at', '-created_at'],
|
|
},
|
|
),
|
|
]
|