Development of an internal social media platform with personalised dashboards for students
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

0001_initial.py 1.2KB

1234567891011121314151617181920212223242526272829303132333435
  1. # Generated by Django 2.1 on 2018-08-18 15:34
  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='CustomUser',
  14. fields=[
  15. ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  16. ],
  17. ),
  18. migrations.CreateModel(
  19. name='Post',
  20. fields=[
  21. ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  22. ('title', models.CharField(max_length=200)),
  23. ('text', models.TextField()),
  24. ('created_date', models.DateTimeField(default=django.utils.timezone.now)),
  25. ('published_date', models.DateTimeField(blank=True, null=True)),
  26. ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
  27. ],
  28. ),
  29. ]