Created
April 17, 2012 12:56
-
-
Save guglielmo/2405810 to your computer and use it in GitHub Desktop.
Deliberation class definition
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Deliberation(Act): | |
""" | |
WRITEME | |
""" | |
INIZIATIVE_CHOICES = Choices( | |
('COUNSELOR', 'counselor', _('Counselor')), | |
('PRESIDENT', 'president', _('President')), | |
('ASSESSOR', 'assessor', _('City Government Member')), | |
('GOVERNMENT', 'government', _('City Government')), | |
('MAYOR', 'mayor', _('Mayor')), | |
) | |
FINAL_STATUSES = [ | |
('APPROVED', _('approved')), | |
('REJECTED', _('rejected')), | |
] | |
STATUS = Choices( | |
('PRESENTED', 'presented', _('presented')), | |
('COMMITTEE', 'committee', _('committee')), | |
('COUNCIL', 'council', _('council')), | |
(FINAL_STATUSES[0][0], 'approved', FINAL_STATUSES[0][1]), | |
(FINAL_STATUSES[1][0], 'rejected', FINAL_STATUSES[1][1]), | |
) | |
status = StatusField() | |
approval_date = models.DateField(_('approval date'), null=True, blank=True) | |
publication_date = models.DateField(_('publication date'), null=True, blank=True) | |
execution_date = models.DateField(_('execution date'), null=True, blank=True) | |
initiative = models.CharField(_('initiative'), max_length=12, choices=INIZIATIVE_CHOICES) | |
approved_text = models.TextField(blank=True) | |
class Meta: | |
verbose_name = _('deliberation') | |
verbose_name_plural = _('deliberations') | |
@models.permalink | |
def get_absolute_url(self): | |
return ('om_deliberation_detail', (), {'pk': str(self.pk)}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment