@@ -75,41 +75,49 @@ class Project(BaseModel):
7575 {
7676 'id' : NONE_STATUS ,
7777 'name' : '----' ,
78+ 'short_name' : '----' ,
7879 'description' : '' ,
7980 },
8081 {
8182 'id' : UNKNOWN ,
8283 'name' : 'Unknown' ,
84+ 'short_name' : 'Unknown' ,
8385 'description' : 'Unknown project status' ,
8486 },
8587 {
8688 'id' : LIVE__RELEASED ,
8789 'name' : 'Live/Released' ,
90+ 'short_name' : 'Live/Released' ,
8891 'description' : 'Project is ready to use' ,
8992 },
9093 {
9194 'id' : WORKING_PROTOTYPE__BETA ,
9295 'name' : 'Working Prototype/Beta' ,
96+ 'short_name' : 'Prototype/Beta' ,
9397 'description' : 'Project is working however, it still can contain some bugs' ,
9498 },
9599 {
96100 'id' : DEMO__ALPHA ,
97101 'name' : 'Demo/Alpha' ,
102+ 'short_name' : 'Demo/Alpha' ,
98103 'description' : 'Project can be used by people which are not afraid of bugs and has very high pain threshold' ,
99104 },
100105 {
101106 'id' : CONCEPT ,
102107 'name' : 'Concept' ,
108+ 'short_name' : 'Concept' ,
103109 'description' : 'Project which pretends to be a working product' ,
104110 },
105111 {
106112 'id' : ABANDONED__BROKEN ,
107113 'name' : 'Abandoned/Broken' ,
114+ 'short_name' : 'Abandoned' ,
108115 'description' : 'Project is no longer available or it is completely broken' ,
109116 },
110117 {
111118 'id' : OUT_OF_DATE__RETIRED ,
112119 'name' : 'Out of Date/Retired' ,
120+ 'short_name' : 'Retired' ,
113121 'description' : 'Project is no longer needed, because of changes in ecosystem' ,
114122 },
115123
@@ -428,6 +436,16 @@ def status_description(self):
428436 )
429437 )
430438
439+ @property
440+ def short_status_name (self ):
441+ return next (
442+ (
443+ status ['short_name' ]
444+ for status in Project .STATUSES
445+ if status ['id' ] == self .status
446+ )
447+ )
448+
431449
432450class TeamMembership (BaseModel ):
433451 account = models .ForeignKey (Account , default = None , blank = True , null = True )
0 commit comments