From 0cf471d51408d9d41a7d465432ba2d7dd9a3c94c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felipe=20=C3=81lvarez?= Date: Tue, 19 Apr 2016 18:52:19 -0300 Subject: [PATCH] PopularProposal with no rejection reason --- .../migrations/0012_auto_20160419_2151.py | 20 +++++++++++++++++++ popular_proposal/models.py | 5 +++-- 2 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 popular_proposal/migrations/0012_auto_20160419_2151.py diff --git a/popular_proposal/migrations/0012_auto_20160419_2151.py b/popular_proposal/migrations/0012_auto_20160419_2151.py new file mode 100644 index 00000000..6400037a --- /dev/null +++ b/popular_proposal/migrations/0012_auto_20160419_2151.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9.2 on 2016-04-19 21:51 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('popular_proposal', '0011_auto_20160418_2332'), + ] + + operations = [ + migrations.AlterField( + model_name='proposaltemporarydata', + name='rejected_reason', + field=models.TextField(blank=True, null=True), + ), + ] diff --git a/popular_proposal/models.py b/popular_proposal/models.py index cd1be1a1..920c07ac 100644 --- a/popular_proposal/models.py +++ b/popular_proposal/models.py @@ -36,7 +36,8 @@ class Statuses(DjangoChoices): area = models.ForeignKey(Area, related_name='temporary_proposals') data = PickledObjectField() rejected = models.BooleanField(default=False) - rejected_reason = models.TextField() + rejected_reason = models.TextField(null=True, + blank=True) comments = PickledObjectField() status = models.CharField(max_length=16, choices=Statuses.choices, @@ -122,7 +123,7 @@ class PopularProposal(models.Model): def __str__(self): return self.title - + def get_absolute_url(self): return reverse('popular_proposals:detail', kwargs={'slug': self.slug})