0001_initial.py 985 B

1234567891011121314151617181920212223242526272829
  1. # Generated by Django 2.0.7 on 2018-07-07 11:37
  2. from django.conf import settings
  3. from django.db import migrations, models
  4. import django.db.models.deletion
  5. import django.utils.timezone
  6. class Migration(migrations.Migration):
  7. initial = True
  8. dependencies = [
  9. migrations.swappable_dependency(settings.AUTH_USER_MODEL),
  10. ]
  11. operations = [
  12. migrations.CreateModel(
  13. name='Post',
  14. fields=[
  15. ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  16. ('title', models.CharField(max_length=200)),
  17. ('text', models.TextField()),
  18. ('create_date', models.DateTimeField(default=django.utils.timezone.now)),
  19. ('published_date', models.DateTimeField(blank=True, null=True)),
  20. ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
  21. ],
  22. ),
  23. ]