Skip to content

Commit

Permalink
luanfonceca#304 - Create a date for start accepting proposals
Browse files Browse the repository at this point in the history
  • Loading branch information
chawki committed Oct 10, 2017
1 parent 47cd162 commit 3d98bc9
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
20 changes: 20 additions & 0 deletions deck/migrations/0018_event_accept_proposals_at.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.5 on 2017-10-10 17:59
from __future__ import unicode_literals

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('deck', '0017_auto_20170922_1704'),
]

operations = [
migrations.AddField(
model_name='event',
name='accept_proposals_at',
field=models.DateTimeField(blank=True, null=True),
),
]
2 changes: 2 additions & 0 deletions deck/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,8 @@ class Event(DeckBaseModel):
anonymous_voting = models.BooleanField(
_('Anonymous Voting?'), default=False)

accept_proposals_at = models.DateTimeField(null=True, blank=True)

class Meta:
ordering = ['-due_date', '-created_at']
verbose_name = _('Event')
Expand Down
3 changes: 3 additions & 0 deletions deck/tests/test_unit.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@ def test_assert_event_jury_should_not_be_required(self):
def test_assert_event_jury_should_have_a_related_name(self):
self.assertEquals('event', self.fields['jury'].rel.related_name)

def test_assert_event_date_accept_proposals_should_not_be_required(self):
self.assertEquals(True, self.fields['accept_proposals_at'].null)
self.assertEquals(True, self.fields['accept_proposals_at'].blank)

class EventObjectTest(TestCase):
def setUp(self):
Expand Down

0 comments on commit 3d98bc9

Please sign in to comment.