Commit 971ac3a4 authored by Arnaud Fabre's avatar Arnaud Fabre

bug fixes

parent 60f49352
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('representatives_votes', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='dossier',
name='text',
field=models.TextField(default=b'', blank=True),
preserve_default=True,
),
migrations.AlterField(
model_name='proposal',
name='description',
field=models.TextField(default=b'', blank=True),
preserve_default=True,
),
migrations.AlterField(
model_name='proposal',
name='kind',
field=models.CharField(default=b'', max_length=200, blank=True),
preserve_default=True,
),
migrations.AlterField(
model_name='proposal',
name='reference',
field=models.CharField(max_length=200, null=True, blank=True),
preserve_default=True,
),
migrations.AlterField(
model_name='vote',
name='representative_name',
field=models.CharField(max_length=200, null=True, blank=True),
preserve_default=True,
),
migrations.AlterField(
model_name='vote',
name='representative_remote_id',
field=models.CharField(max_length=200, null=True, blank=True),
preserve_default=True,
),
]
......@@ -22,17 +22,17 @@ from django.db import models
class Dossier(models.Model):
title = models.CharField(max_length=1000)
reference = models.CharField(max_length=200)
text = models.TextField(blank=True)
text = models.TextField(blank=True, default='')
link = models.URLField()
class Proposal(models.Model):
dossier = models.ForeignKey(Dossier, related_name='proposals')
title = models.CharField(max_length=1000)
description = models.TextField(blank=True)
reference = models.CharField(max_length=200, blank=True)
description = models.TextField(blank=True, default='')
reference = models.CharField(max_length=200, blank=True, null=True)
datetime = models.DateTimeField()
kind = models.CharField(max_length=200, blank=True)
kind = models.CharField(max_length=200, blank=True, default='')
total_abstain = models.IntegerField()
total_against = models.IntegerField()
total_for = models.IntegerField()
......@@ -56,7 +56,7 @@ class Vote(models.Model):
proposal = models.ForeignKey(Proposal, related_name='votes')
# There are two representative fields for flexibility,
representative_name = models.CharField(max_length=200, blank=True)
representative_remote_id = models.CharField(max_length=200, blank=True)
representative_name = models.CharField(max_length=200, blank=True, null=True)
representative_remote_id = models.CharField(max_length=200, blank=True, null=True)
position = models.CharField(max_length=10, choices=VOTECHOICES)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment