@@ -14,6 +14,8 @@ class IdSubmissionStatus(models.Model):
1414 class Meta :
1515 db_table = 'id_submission_status'
1616
17+ def __unicode__ (self ):
18+ return self .status_value
1719
1820class IdSubmissionDetail (models .Model ):
1921 submission_id = models .AutoField (primary_key = True )
@@ -58,14 +60,17 @@ def get_hash(self):
5860 self .create_hash ()
5961 self .save ()
6062 return self .submission_hash
63+ def status_link (self ):
64+ return '<a href="http://datatracker.ietf.org/submit/status/%s/%s/">%s</a>' % (self .submission_id , self .submission_hash , self .status )
65+ status_link .allow_tags = True
66+
6167
6268def create_submission_hash (sender , instance , ** kwargs ):
6369 instance .create_hash ()
6470
6571models .signals .pre_save .connect (create_submission_hash , sender = IdSubmissionDetail )
6672
6773class IdApprovedDetail (models .Model ):
68- id = models .AutoField (primary_key = True )
6974 filename = models .CharField (null = True , blank = True , max_length = 255 )
7075 approved_status = models .IntegerField (null = True , blank = True )
7176 approved_person_tag = models .IntegerField (null = True , blank = True )
@@ -75,9 +80,11 @@ class IdApprovedDetail(models.Model):
7580 class Meta :
7681 db_table = 'id_approved_detail'
7782
83+ def __unicode__ (self ):
84+ return "%s (%s)" % (self .filename , self .approved_status )
85+
7886
7987class TempIdAuthors (models .Model ):
80- id = models .AutoField (primary_key = True )
8188 id_document_tag = models .IntegerField ()
8289 first_name = models .CharField (blank = True , max_length = 255 )
8390 last_name = models .CharField (blank = True , max_length = 255 )
@@ -100,3 +107,6 @@ def get_full_name(self):
100107 self .last_name , self .name_suffix or '' )
101108 full_name = re .sub (' +' , ' ' , full_name ).strip ()
102109 return full_name
110+
111+ def __unicode__ (self ):
112+ return u"%s <%s>" % self .email ()
0 commit comments