|
| 1 | +# -*- coding: utf-8 -*- |
| 2 | +from __future__ import unicode_literals |
| 3 | + |
| 4 | +from django.db import models, migrations |
| 5 | +from django.conf import settings |
| 6 | +import django_extensions.db.fields |
| 7 | +import django.utils.timezone |
| 8 | +import autoslug.fields |
| 9 | + |
| 10 | + |
| 11 | +class Migration(migrations.Migration): |
| 12 | + |
| 13 | + dependencies = [ |
| 14 | + migrations.swappable_dependency(settings.AUTH_USER_MODEL), |
| 15 | + ('core', '0005_auto_20150730_0231'), |
| 16 | + ] |
| 17 | + |
| 18 | + operations = [ |
| 19 | + migrations.CreateModel( |
| 20 | + name='Vote', |
| 21 | + fields=[ |
| 22 | + ('id', models.AutoField(serialize=False, verbose_name='ID', primary_key=True, auto_created=True)), |
| 23 | + ('created', django_extensions.db.fields.CreationDateTimeField(editable=False, default=django.utils.timezone.now, blank=True)), |
| 24 | + ('modified', django_extensions.db.fields.ModificationDateTimeField(editable=False, default=django.utils.timezone.now, blank=True)), |
| 25 | + ('vote_time', models.DateTimeField(null=True)), |
| 26 | + ('points', models.IntegerField(verbose_name='Points', null=True)), |
| 27 | + ('project', models.ForeignKey(to='core.Project')), |
| 28 | + ('voter', models.ForeignKey(to=settings.AUTH_USER_MODEL)), |
| 29 | + ], |
| 30 | + ), |
| 31 | + migrations.CreateModel( |
| 32 | + name='VotingPoll', |
| 33 | + fields=[ |
| 34 | + ('id', models.AutoField(serialize=False, verbose_name='ID', primary_key=True, auto_created=True)), |
| 35 | + ('created', django_extensions.db.fields.CreationDateTimeField(editable=False, default=django.utils.timezone.now, blank=True)), |
| 36 | + ('modified', django_extensions.db.fields.ModificationDateTimeField(editable=False, default=django.utils.timezone.now, blank=True)), |
| 37 | + ('slug', autoslug.fields.AutoSlugField(editable=False)), |
| 38 | + ('title', models.CharField(verbose_name='Title', max_length=255)), |
| 39 | + ('description', models.TextField(blank=True, verbose_name='Description')), |
| 40 | + ('author', models.ForeignKey(to=settings.AUTH_USER_MODEL)), |
| 41 | + ], |
| 42 | + ), |
| 43 | + migrations.AddField( |
| 44 | + model_name='vote', |
| 45 | + name='voting_poll', |
| 46 | + field=models.ForeignKey(to='core.VotingPoll'), |
| 47 | + ), |
| 48 | + ] |
0 commit comments