35 lines
1.5 KiB
Python
35 lines
1.5 KiB
Python
# Generated by Django 5.2.6 on 2025-12-29 05:20
|
|
|
|
import django.db.models.deletion
|
|
import django.utils.timezone
|
|
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='Blog',
|
|
fields=[
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('published_on', models.DateTimeField(auto_created=True, default=django.utils.timezone.now)),
|
|
('title', models.CharField(blank=True, max_length=80, null=True)),
|
|
('content', models.TextField(blank=True, null=True)),
|
|
('cover_image', models.ImageField(blank=True, null=True, upload_to='blogs')),
|
|
('meta_title', models.CharField(blank=True, max_length=80, null=True)),
|
|
('meta_description', models.CharField(blank=True, max_length=180, null=True)),
|
|
('meta_keywords', models.CharField(blank=True, max_length=100, null=True)),
|
|
('is_draft', models.BooleanField(default=True)),
|
|
('is_active', models.BooleanField(default=False)),
|
|
('published_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to=settings.AUTH_USER_MODEL)),
|
|
],
|
|
),
|
|
]
|