django app moved to subfolder
This commit is contained in:
parent
ad685a0625
commit
bb2d2b7124
75 changed files with 27 additions and 0 deletions
33
django_app/blog/migrations/0001_initial.py
Normal file
33
django_app/blog/migrations/0001_initial.py
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
# Generated by Django 4.2.7 on 2023-11-26 07:10
|
||||
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Article',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('title', models.CharField(max_length=200, unique=True)),
|
||||
('slug', models.SlugField(max_length=200, unique=True)),
|
||||
('updated_on', models.DateTimeField(auto_now=True)),
|
||||
('content', models.TextField()),
|
||||
('created_on', models.DateTimeField(auto_now_add=True)),
|
||||
('status', models.IntegerField(choices=[(0, 'Draft'), (1, 'Publish')], default=0)),
|
||||
('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='articles', to=settings.AUTH_USER_MODEL)),
|
||||
],
|
||||
options={
|
||||
'ordering': ['-created_on'],
|
||||
},
|
||||
),
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue