Display proposal result status in proposal admin change lists
feedback from pycon development commit 3401cdd8253d86e166d980a1d1eb5ba2de01932d Author: Dan Poirier <dpoirier@caktusgroup.com> Date: Thu Jun 6 15:10:57 2013 -0400 Signed-off-by: Hiroshi Miura <miurahr@linux.com>
This commit is contained in:
		
							parent
							
								
									7ff4c0b4ef
								
							
						
					
					
						commit
						464d85b36a
					
				
					 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…
	
	Add table
		
		Reference in a new issue
	
	 Hiroshi Miura
						Hiroshi Miura