Skip to content

Commit cf81cce

Browse files
committed
remove references to old models for shim removal release. ready for merge
- Legacy-Id: 7009
1 parent 9b06fb9 commit cf81cce

6 files changed

Lines changed: 3 additions & 221 deletions

File tree

ietf/secr/drafts/email.py

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -171,30 +171,6 @@ def get_fullcc_list(draft):
171171
if draft.shepherd:
172172
emails[draft.shepherd.email_address()] = '"%s"' % (draft.shepherd.name)
173173

174-
"""
175-
# add wg advisor
176-
try:
177-
advisor = IETFWG.objects.get(group_acronym=draft.group.acronym_id).area_director
178-
if advisor:
179-
add_email(emails,advisor.person)
180-
except ObjectDoesNotExist:
181-
pass
182-
# add shepherding ad
183-
try:
184-
id = IDInternal.objects.get(draft=draft.id_document_tag)
185-
add_email(emails,id.job_owner.person)
186-
except ObjectDoesNotExist:
187-
pass
188-
# add state_change_notice to
189-
try:
190-
id = IDInternal.objects.get(draft=draft.id_document_tag)
191-
for email in id.state_change_notice_to.split(','):
192-
if email.strip() not in emails:
193-
emails[email.strip()] = ''
194-
except ObjectDoesNotExist:
195-
pass
196-
"""
197-
198174
# use sort so we get consistently ordered lists
199175
result_list = []
200176
for key in sorted(emails):

ietf/secr/drafts/forms.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ def save(self, force_insert=False, force_update=False, commit=True):
188188
# field must contain filename of existing draft
189189
def clean_replaced_by(self):
190190
name = self.cleaned_data.get('replaced_by', '')
191-
if name and not InternetDraft.objects.filter(filename=name):
191+
if name and not Document.objects.filter(name=name):
192192
raise forms.ValidationError("ERROR: Draft does not exist")
193193
return name
194194

ietf/secr/ipradmin/models.py

Lines changed: 0 additions & 192 deletions
Original file line numberDiff line numberDiff line change
@@ -1,193 +1 @@
1-
# Copyright The IETF Trust 2007, All Rights Reserved
2-
3-
from django.db import models
4-
#from django import newforms as forms
5-
#from sec.drafts.models import InternetDraft
6-
#from sec.drafts.models import Rfc
7-
81
from ietf.ipr.models import *
9-
10-
# ------------------------------------------------------------------------
11-
# Models
12-
13-
'''
14-
LICENSE_CHOICES = (
15-
(1, 'a) No License Required for Implementers.'),
16-
(2, 'b) Royalty-Free, Reasonable and Non-Discriminatory License to All Implementers.'),
17-
(3, 'c) Reasonable and Non-Discriminatory License to All Implementers with Possible Royalty/Fee.'),
18-
(4, 'd) Licensing Declaration to be Provided Later (implies a willingness'
19-
' to commit to the provisions of a), b), or c) above to all implementers;'
20-
' otherwise, the next option "Unwilling to Commit to the Provisions of'
21-
' a), b), or c) Above". - must be selected).'),
22-
(5, 'e) Unwilling to Commit to the Provisions of a), b), or c) Above.'),
23-
(6, 'f) See Text Below for Licensing Declaration.'),
24-
)
25-
STDONLY_CHOICES = (
26-
(0, ""),
27-
(1, "The licensing declaration is limited solely to standards-track IETF documents."),
28-
)
29-
SELECT_CHOICES = (
30-
(0, 'NO'),
31-
(1, 'YES'),
32-
(2, 'NO'),
33-
)
34-
STATUS_CHOICES = (
35-
( 0, "Waiting for approval" ),
36-
( 1, "Approved and Posted" ),
37-
( 2, "Rejected by Administrator" ),
38-
( 3, "Removed by Request" ),
39-
)
40-
# not clear why this has both an ID and selecttype
41-
# Also not clear why a table for "YES" and "NO".
42-
class IprSelecttype(models.Model):
43-
type_id = models.AutoField(primary_key=True)
44-
is_pending = models.IntegerField(unique=True, db_column="selecttype")
45-
type_display = models.CharField(blank=True, max_length=15)
46-
def __str__(self):
47-
return self.type_display
48-
class Meta:
49-
db_table = 'ipr_selecttype'
50-
51-
class IprLicensing(models.Model):
52-
licensing_option = models.AutoField(primary_key=True)
53-
value = models.CharField(max_length=255, db_column='licensing_option_value')
54-
def __str__(self):
55-
return self.value;
56-
class Meta:
57-
db_table = 'ipr_licensing'
58-
59-
60-
class IprDetail(models.Model):
61-
ipr_id = models.AutoField(primary_key=True)
62-
title = models.CharField(blank=True, db_column="document_title", max_length=255)
63-
64-
# Legacy information fieldset
65-
legacy_url_0 = models.CharField(blank=True, null=True, db_column="old_ipr_url", max_length=255)
66-
legacy_url_1 = models.CharField(blank=True, null=True, db_column="additional_old_url1", max_length=255)
67-
legacy_title_1 = models.CharField(blank=True, null=True, db_column="additional_old_title1", max_length=255)
68-
legacy_url_2 = models.CharField(blank=True, null=True, db_column="additional_old_url2", max_length=255)
69-
legacy_title_2 = models.CharField(blank=True, null=True, db_column="additional_old_title2", max_length=255)
70-
71-
# Patent holder fieldset
72-
legal_name = models.CharField("Legal Name", db_column="p_h_legal_name", max_length=255)
73-
74-
# Patent Holder Contact fieldset
75-
# self.contact.filter(contact_type=1)
76-
77-
# IETF Contact fieldset
78-
# self.contact.filter(contact_type=3)
79-
80-
# Related IETF Documents fieldset
81-
rfc_number = models.IntegerField(null=True, editable=False, blank=True) # always NULL
82-
id_document_tag = models.IntegerField(null=True, editable=False, blank=True) # always NULL
83-
other_designations = models.CharField(blank=True, max_length=255)
84-
document_sections = models.TextField("Specific document sections covered", blank=True, max_length=255, db_column='disclouser_identify')
85-
86-
# Patent Information fieldset
87-
patents = models.TextField("Patent Applications", db_column="p_applications", max_length=255)
88-
date_applied = models.CharField(max_length=255)
89-
country = models.CharField(max_length=100)
90-
notes = models.TextField("Additional notes", db_column="p_notes", blank=True)
91-
# AMS Change
92-
#is_pending = models.IntegerField("Unpublished Pending Patent Application", blank=True, choices=SELECT_CHOICES, db_column="selecttype")
93-
#is_pending = models.BooleanField(db_column="selecttype")
94-
is_pending = models.CharField(max_length=3,db_column="selecttype")
95-
applies_to_all = models.IntegerField("Applies to all IPR owned by Submitter", blank=True, choices=SELECT_CHOICES, db_column="selectowned")
96-
97-
# Licensing Declaration fieldset
98-
#licensing_option = models.ForeignKey(IprLicensing, db_column='licensing_option')
99-
licensing_option = models.IntegerField(null=True, blank=True, choices=LICENSE_CHOICES)
100-
lic_opt_a_sub = models.IntegerField(editable=False, choices=STDONLY_CHOICES)
101-
lic_opt_b_sub = models.IntegerField(editable=False, choices=STDONLY_CHOICES)
102-
lic_opt_c_sub = models.IntegerField(editable=False, choices=STDONLY_CHOICES)
103-
comments = models.TextField("Licensing Comments", blank=True)
104-
lic_checkbox = models.BooleanField("All terms and conditions has been disclosed")
105-
106-
107-
# Other notes fieldset
108-
other_notes = models.TextField(blank=True)
109-
110-
# Generated fields, not part of the submission form
111-
# Hidden fields
112-
third_party = models.BooleanField()
113-
generic = models.BooleanField()
114-
comply = models.BooleanField()
115-
116-
status = models.IntegerField(null=True, blank=True, choices=STATUS_CHOICES)
117-
submitted_date = models.DateField(blank=True)
118-
update_notified_date = models.DateField(null=True, blank=True)
119-
120-
def __str__(self):
121-
return self.title
122-
def docs(self):
123-
return list(self.drafts.all()) + list(self.rfcs.all())
124-
def get_absolute_url(self):
125-
return "/ipr/%d/" % self.ipr_id
126-
def get_submitter(self):
127-
try:
128-
return self.contact.get(contact_type=3)
129-
except IprContact.DoesNotExist:
130-
return None
131-
class Meta:
132-
db_table = 'ipr_detail'
133-
134-
class IprContact(models.Model):
135-
TYPE_CHOICES = (
136-
(1, 'Patent Holder Contact'),
137-
(2, 'IETF Participant Contact'),
138-
(3, 'Submitter Contact'),
139-
)
140-
contact_id = models.AutoField(primary_key=True)
141-
ipr = models.ForeignKey(IprDetail, related_name="contact")
142-
contact_type = models.IntegerField(choices=TYPE_CHOICES)
143-
name = models.CharField(max_length=255)
144-
title = models.CharField(blank=True, max_length=255)
145-
department = models.CharField(blank=True, max_length=255)
146-
address1 = models.CharField(blank=True, max_length=255)
147-
address2 = models.CharField(blank=True, max_length=255)
148-
telephone = models.CharField(max_length=25)
149-
fax = models.CharField(blank=True, max_length=25)
150-
email = models.EmailField(max_length=255)
151-
def __str__(self):
152-
return self.name or '<no name>'
153-
class Meta:
154-
db_table = 'ipr_contacts'
155-
156-
157-
class IprDraft(models.Model):
158-
ipr = models.ForeignKey(IprDetail, related_name='drafts')
159-
document = models.ForeignKey(InternetDraft, db_column='id_document_tag', related_name="ipr")
160-
revision = models.CharField(max_length=2)
161-
def __str__(self):
162-
return "%s which applies to %s-%s" % ( self.ipr, self.document, self.revision )
163-
class Meta:
164-
db_table = 'ipr_ids'
165-
166-
class IprNotification(models.Model):
167-
ipr = models.ForeignKey(IprDetail)
168-
notification = models.TextField(blank=True)
169-
date_sent = models.DateField(null=True, blank=True)
170-
time_sent = models.CharField(blank=True, max_length=25)
171-
def __str__(self):
172-
return "IPR notification for %s sent %s %s" % (self.ipr, self.date_sent, self.time_sent)
173-
class Meta:
174-
db_table = 'ipr_notifications'
175-
176-
class IprRfc(models.Model):
177-
ipr = models.ForeignKey(IprDetail, related_name='rfcs')
178-
document = models.ForeignKey(Rfc, db_column='rfc_number', related_name="ipr")
179-
def __str__(self):
180-
return "%s applies to RFC%04d" % ( self.ipr, self.document_id )
181-
class Meta:
182-
db_table = 'ipr_rfcs'
183-
184-
class IprUpdate(models.Model):
185-
id = models.IntegerField(primary_key=True)
186-
ipr = models.ForeignKey(IprDetail, related_name='updates')
187-
updated = models.ForeignKey(IprDetail, db_column='updated', related_name='updated_by')
188-
status_to_be = models.IntegerField(null=True, blank=True)
189-
processed = models.IntegerField(null=True, blank=True)
190-
class Meta:
191-
db_table = 'ipr_updates'
192-
193-
'''

ietf/secr/ipradmin/views.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def admin_post(request, ipr_id, from_page, command):
6767
ipr_dtl.save()
6868

6969
#assert False, (ipr_dtl.ipr_id, ipr_dtl.is_pending)
70-
redirect_url = '/ipradmin/admin/notify/%s?from=%s' % (ipr_id, from_page)
70+
redirect_url = '/secr/ipradmin/admin/notify/%s?from=%s' % (ipr_id, from_page)
7171

7272
return HttpResponseRedirect(redirect_url)
7373
# end admin_post
@@ -720,7 +720,7 @@ def admin_update(request, ipr_id):
720720
ipr_detail = ipr_detail_form.save(commit=False)
721721
if 'update_ipr' in request.POST:
722722
if ipr_detail.third_party:
723-
return HttpResponseRedirect('/ipradmin/admin/notify/%s?from=update' % ipr_id)
723+
return HttpResponseRedirect('/secr/ipradmin/admin/notify/%s?from=update' % ipr_id)
724724
else:
725725
redirect_url = ''
726726
else: # remove

ietf/secr/proceedings/views.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424

2525
from ietf.doc.models import Document, DocAlias, DocEvent, State, NewRevisionDocEvent, RelatedDocument
2626
from ietf.group.models import Group
27-
from ietf.group.proxy import IETFWG
2827
from ietf.group.utils import get_charter_text
2928
from ietf.ietfauth.decorators import has_role
3029
from ietf.meeting.models import Meeting, Session, TimeSlot, ScheduledSession

ietf/secr/telechat/views.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
from django.template import RequestContext
99

1010
from ietf.doc.models import DocEvent, Document, BallotDocEvent, BallotPositionDocEvent, TelechatDocEvent, WriteupDocEvent, save_document_in_history
11-
from ietf.doc.proxy import InternetDraft
1211
from ietf.doc.utils import get_document_content, log_state_changed
1312
from ietf.group.models import Group
1413
from ietf.name.models import BallotPositionName

0 commit comments

Comments
 (0)