2323 ("1" , 'YES' ),
2424 ("2" , 'NO' ),
2525)
26-
26+ STATUS_CHOICES = (
27+ ( 0 , "Waiting for approval" ),
28+ ( 1 , "Approved and Posted" ),
29+ ( 2 , "Rejected by Administrator" ),
30+ ( 3 , "Removed by Request" ),
31+ )
2732# not clear why this has both an ID and selecttype
2833# Also not clear why a table for "YES" and "NO".
2934class IprSelecttype (models .Model ):
3035 type_id = models .AutoField (primary_key = True )
31- selecttype = models .IntegerField (unique = True )
36+ is_pending = models .IntegerField (unique = True , db_column = "selecttype" )
3237 type_display = models .CharField (blank = True , maxlength = 15 )
3338 def __str__ (self ):
3439 return self .type_display
@@ -50,14 +55,14 @@ class Admin:
5055
5156class IprDetail (models .Model ):
5257 ipr_id = models .AutoField (primary_key = True )
53- document_title = models .CharField (blank = True , maxlength = 255 )
58+ title = models .CharField (blank = True , db_column = "document_title" , maxlength = 255 )
5459
5560 # Legacy information fieldset
56- old_ipr_url = models .CharField (blank = True , maxlength = 255 )
57- additional_old_title1 = models .CharField (blank = True , maxlength = 255 )
58- additional_old_url1 = models .CharField (blank = True , maxlength = 255 )
59- additional_old_title2 = models .CharField (blank = True , maxlength = 255 )
60- additional_old_url2 = models .CharField (blank = True , maxlength = 255 )
61+ legacy_url_0 = models .CharField (blank = True , db_column = "old_ipr_url" , maxlength = 255 )
62+ legacy_url_1 = models .CharField (blank = True , db_column = "additional_old_url1" , maxlength = 255 )
63+ legacy_title_1 = models .CharField (blank = True , db_column = "additional_old_title1" , maxlength = 255 )
64+ legacy_url_2 = models .CharField (blank = True , db_column = "additional_old_url2" , maxlength = 255 )
65+ legacy_title_2 = models .CharField (blank = True , db_column = "additional_old_title2" , maxlength = 255 )
6166
6267 # Patent holder fieldset
6368 legal_name = models .CharField ("Legal Name" , db_column = "p_h_legal_name" , maxlength = 255 )
@@ -72,15 +77,15 @@ class IprDetail(models.Model):
7277 rfc_number = models .IntegerField (null = True , editable = False , blank = True ) # always NULL
7378 id_document_tag = models .IntegerField (null = True , editable = False , blank = True ) # always NULL
7479 other_designations = models .CharField (blank = True , maxlength = 255 )
75- discloser_identify = models .TextField ("Specific document sections covered" , blank = True , maxlength = 255 , db_column = 'disclouser_identify' )
80+ document_sections = models .TextField ("Specific document sections covered" , blank = True , maxlength = 255 , db_column = 'disclouser_identify' )
7681
7782 # Patent Information fieldset
78- p_applications = models .TextField ("Patent Applications" , maxlength = 255 )
83+ patents = models .TextField ("Patent Applications" , db_column = "p_applications " , maxlength = 255 )
7984 date_applied = models .CharField (maxlength = 255 )
8085 country = models .CharField (maxlength = 100 )
81- p_notes = models .TextField ("Additional notes" , blank = True )
82- selecttype = models .IntegerField ("Unpublished Pending Patent Application" , blank = True , choices = SELECT_CHOICES )
83- selectowned = models .IntegerField ("Applies to all IPR owned by Submitter" , blank = True , choices = SELECT_CHOICES )
86+ notes = models .TextField ("Additional notes" , db_column = "p_notes " , blank = True )
87+ is_pending = models .IntegerField ("Unpublished Pending Patent Application" , blank = True , choices = SELECT_CHOICES , db_column = "selecttype" )
88+ applies_to_all = models .IntegerField ("Applies to all IPR owned by Submitter" , blank = True , choices = SELECT_CHOICES , db_column = "selectowned" )
8489
8590 # Licensing Declaration fieldset
8691 #licensing_option = models.ForeignKey(IprLicensing, db_column='licensing_option')
@@ -101,37 +106,12 @@ class IprDetail(models.Model):
101106 generic = models .BooleanField ()
102107 comply = models .BooleanField ()
103108
104- status = models .IntegerField (null = True , blank = True )
109+ status = models .IntegerField (null = True , blank = True , choices = STATUS_CHOICES )
105110 submitted_date = models .DateField (blank = True )
106111 update_notified_date = models .DateField (null = True , blank = True )
107112
108113 def __str__ (self ):
109114 return self .document_title
110- def selecttypetext (self ):
111- if self .selecttype == "1" :
112- return "YES"
113- else :
114- return "NO"
115- def selectownedtext (self ):
116- if self .selectowned == "1" :
117- return "YES"
118- else :
119- return "NO"
120- # def get_patent_holder_contact(self):
121- # try:
122- # return self.contact.filter(contact_type=1)[0]
123- # except:
124- # return None
125- # def get_ietf_contact(self):
126- # try:
127- # return self.contact.filter(contact_type=2)[0]
128- # except:
129- # return None
130- # def get_submitter(self):
131- # try:
132- # return self.contact.filter(contact_type=3)[0]
133- # except:
134- # return None
135115 def get_absolute_url (self ):
136116 return "/ipr/ipr-%s" % self .ipr_id
137117 class Meta :
0 commit comments