0001_initial.py 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. # -*- coding: utf-8 -*-
  2. # Generated by Django 1.10.6 on 2017-03-09 14:55
  3. from __future__ import unicode_literals
  4. import datetime
  5. from django.db import migrations, models
  6. import django.db.models.deletion
  7. from django.utils.timezone import utc
  8. class Migration(migrations.Migration):
  9. initial = True
  10. dependencies = [
  11. ]
  12. operations = [
  13. migrations.CreateModel(
  14. name='Comment',
  15. fields=[
  16. ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  17. ('author', models.CharField(max_length=255)),
  18. ('website', models.CharField(default='', max_length=255)),
  19. ('pub_date', models.DateField(default=datetime.datetime(2017, 3, 9, 14, 55, 27, 298437, tzinfo=utc))),
  20. ('content', models.TextField()),
  21. ],
  22. ),
  23. migrations.CreateModel(
  24. name='Post',
  25. fields=[
  26. ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  27. ('title', models.CharField(max_length=255)),
  28. ('content', models.TextField()),
  29. ('pub_date', models.DateField(default=datetime.datetime(2017, 3, 9, 14, 55, 27, 297788, tzinfo=utc))),
  30. ],
  31. ),
  32. migrations.AddField(
  33. model_name='comment',
  34. name='post',
  35. field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='blog.Post'),
  36. ),
  37. ]