Merge pull request #75 from miurahr/proposal_status
Display proposal result status in proposal admin change lists
This commit is contained in:
commit
91ae3de6df
1 changed files with 8 additions and 0 deletions
|
@ -8,6 +8,7 @@ from django.utils.translation import ugettext_lazy as _
|
|||
from django.utils.timezone import now
|
||||
|
||||
from django.contrib.auth.models import User
|
||||
from django.core.exceptions import ObjectDoesNotExist
|
||||
|
||||
import reversion
|
||||
|
||||
|
@ -124,6 +125,13 @@ class ProposalBase(models.Model):
|
|||
def number(self):
|
||||
return str(self.pk).zfill(3)
|
||||
|
||||
@property
|
||||
def status(self):
|
||||
try:
|
||||
return self.result.status
|
||||
except ObjectDoesNotExist:
|
||||
return _('Undecided')
|
||||
|
||||
def speakers(self):
|
||||
yield self.speaker
|
||||
speakers = self.additional_speakers.exclude(
|
||||
|
|
Loading…
Reference in a new issue