1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- # Generated by Django 3.2.5 on 2021-07-18 10:57
- from django.conf import settings
- from django.db import migrations, models
- import django.db.models.deletion
- import django.utils.timezone
- import taggit.managers
- class Migration(migrations.Migration):
- initial = True
- dependencies = [
- migrations.swappable_dependency(settings.AUTH_USER_MODEL),
- ('taggit', '0003_taggeditem_add_unique_index'),
- ]
- operations = [
- migrations.CreateModel(
- name='ArticleColumn',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('title', models.CharField(blank=True, max_length=100)),
- ('created', models.DateTimeField(default=django.utils.timezone.now)),
- ],
- ),
- migrations.CreateModel(
- name='ArticlePost',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('title', models.CharField(max_length=100)),
- ('summary', models.CharField(max_length=100)),
- ('body', models.TextField()),
- ('created', models.DateTimeField(default=django.utils.timezone.now)),
- ('updated', models.DateTimeField(default=django.utils.timezone.now)),
- ('total_views', models.PositiveIntegerField(default=0)),
- ('avatar', models.ImageField(blank=True, upload_to='article/%Y%m%d/')),
- ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
- ('column', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='article', to='article.articlecolumn')),
- ('tags', taggit.managers.TaggableManager(blank=True, help_text='A comma-separated list of tags.', through='taggit.TaggedItem', to='taggit.Tag', verbose_name='Tags')),
- ],
- options={
- 'ordering': ('-created',),
- },
- ),
- ]
|