Skip to content

Commit db090de

Browse files
committed
Removed old Django 0.96 Admin classes
- Legacy-Id: 2054
1 parent a16af08 commit db090de

9 files changed

Lines changed: 3 additions & 226 deletions

File tree

ietf/announcements/models.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ class Meta:
2525
# ("ietf_execdir_announcedfromperm", "Can send messages from IETF Executive Director"),
2626
# ("other_announcedfromperm", "Can send announcements from others"),
2727
#)
28-
class Admin:
29-
pass
3028

3129
class AnnouncedTo(models.Model):
3230
announced_to_id = models.AutoField(primary_key=True)
@@ -36,8 +34,6 @@ def __str__(self):
3634
return self.announced_to
3735
class Meta:
3836
db_table = 'announced_to'
39-
class Admin:
40-
pass
4137

4238
class Announcement(models.Model):
4339
announcement_id = models.AutoField(primary_key=True)
@@ -64,11 +60,6 @@ def from_name(self):
6460
return self.announced_from
6561
class Meta:
6662
db_table = 'announcements'
67-
class Admin:
68-
list_display = ('announced_from', 'announced_to', 'announced_date', 'subject')
69-
date_hierarchy = 'announced_date'
70-
list_filter = ['nomcom', 'manually_added']
71-
pass
7263

7364
class ScheduledAnnouncement(models.Model):
7465
mail_sent = models.BooleanField()
@@ -94,8 +85,6 @@ def __str__(self):
9485
return "Scheduled Announcement from %s to %s on %s %s" % (self.from_val, self.to_val, self.to_be_sent_date, self.to_be_sent_time)
9586
class Meta:
9687
db_table = 'scheduled_announcements'
97-
class Admin:
98-
pass
9988

10089
# changes done by convert-096.py:changed maxlength to max_length
10190
# removed filter_interface

ietf/idrfc/models.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,6 @@ def __str__(self):
5252
return "RfcEditorQueue"+str([self.draft, self.date_received, self.state, self.state_date, self.stream])
5353
class Meta:
5454
db_table = "rfc_editor_queue_mirror"
55-
class Admin:
56-
pass
5755

5856
class RfcEditorQueueRef(models.Model):
5957
source = models.ForeignKey(InternetDraft, db_column="source", related_name="rfc_editor_queue_refs")
@@ -62,8 +60,6 @@ class RfcEditorQueueRef(models.Model):
6260
direct = models.BooleanField()
6361
class Meta:
6462
db_table = "rfc_editor_queue_mirror_refs"
65-
class Admin:
66-
pass
6763

6864
class RfcIndex(models.Model):
6965
rfc_number = models.IntegerField(primary_key=True)
@@ -82,8 +78,6 @@ def __str__(self):
8278
return "RfcIndex"+str(self.rfc_number)
8379
class Meta:
8480
db_table = "rfc_index_mirror"
85-
class Admin:
86-
pass
8781

8882
class DraftVersions(models.Model):
8983
# Django does not support multi-column primary keys, so
@@ -97,8 +91,4 @@ def __str__(self):
9791
return "DraftVersions"+self.filename+self.revision+str(self.revision_date)
9892
class Meta:
9993
db_table = "draft_versions_mirror"
100-
class Admin:
101-
pass
10294

103-
104-
# changes done by convert-096.py:changed maxlength to max_length

ietf/idtracker/models.py

Lines changed: 1 addition & 108 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@ def __str__(self):
2020
return self.acronym
2121
class Meta:
2222
db_table = "acronym"
23-
class Admin:
24-
list_display = ('acronym', 'name')
25-
pass
2623

2724
class AreaStatus(models.Model):
2825
status_id = models.AutoField(primary_key=True)
@@ -31,8 +28,6 @@ def __str__(self):
3128
return self.status
3229
class Meta:
3330
db_table = 'area_status'
34-
class Admin:
35-
pass
3631

3732
# I think equiv_group_flag is historical.
3833
class IDState(models.Model):
@@ -48,8 +43,6 @@ def choices():
4843
class Meta:
4944
db_table = 'ref_doc_states_new'
5045
ordering = ['document_state_id']
51-
class Admin:
52-
pass
5346

5447
class IDNextState(models.Model):
5548
cur_state = models.ForeignKey(IDState, related_name='nextstate')
@@ -59,8 +52,6 @@ def __str__(self):
5952
return "%s -> %s" % (self.cur_state.state, self.next_state.state )
6053
class Meta:
6154
db_table = 'ref_next_states_new'
62-
class Admin:
63-
pass
6455

6556
class IDSubState(models.Model):
6657
sub_state_id = models.AutoField(primary_key=True)
@@ -71,8 +62,6 @@ def __str__(self):
7162
class Meta:
7263
db_table = 'sub_state'
7364
ordering = ['sub_state_id']
74-
class Admin:
75-
pass
7665

7766
class Area(models.Model):
7867
ACTIVE=1
@@ -95,9 +84,6 @@ def active_areas():
9584
class Meta:
9685
db_table = 'areas'
9786
verbose_name="area"
98-
class Admin:
99-
list_display = ('area_acronym', 'status')
100-
pass
10187

10288
class AreaWGURL(models.Model):
10389
id = models.AutoField(primary_key=True, db_column='area_ID')
@@ -120,8 +106,6 @@ class Meta:
120106
db_table = "id_status"
121107
verbose_name="I-D Status"
122108
verbose_name_plural="I-D Statuses"
123-
class Admin:
124-
pass
125109

126110
class IDIntendedStatus(models.Model):
127111
intended_status_id = models.AutoField(primary_key=True)
@@ -132,8 +116,6 @@ class Meta:
132116
db_table = "id_intended_status"
133117
verbose_name="I-D Intended Publication Status"
134118
verbose_name_plural="I-D Intended Publication Statuses"
135-
class Admin:
136-
pass
137119

138120
class InternetDraft(models.Model):
139121
DAYS_TO_EXPIRE=185
@@ -255,13 +237,6 @@ def clean_abstract(self):
255237

256238
class Meta:
257239
db_table = "internet_drafts"
258-
class Admin:
259-
search_fields = ['filename','title']
260-
list_display = ('filename', 'revision', 'title', 'status')
261-
list_filter = ['status']
262-
pass
263-
#date_hierarchy = 'revision_date'
264-
#list_filter = ['revision_date']
265240

266241
class PersonOrOrgInfo(models.Model):
267242
person_or_org_tag = models.AutoField(primary_key=True)
@@ -322,17 +297,6 @@ class Meta:
322297
ordering = ['last_name']
323298
verbose_name="Rolodex Entry"
324299
verbose_name_plural="Rolodex"
325-
class Admin:
326-
search_fields = ['first_name','last_name']
327-
fields = (
328-
(None, {
329-
'fields': (('first_name', 'middle_initial', 'last_name'), ('name_suffix', 'modified_by'))
330-
}),
331-
('Obsolete Info', {
332-
'classes': 'collapse',
333-
'fields': ('record_type', 'created_by', 'address_type')
334-
}))
335-
pass
336300

337301
# could use a mapping for user_level
338302
class IESGLogin(models.Model):
@@ -362,10 +326,6 @@ def active_iesg():
362326
active_iesg = staticmethod(active_iesg)
363327
class Meta:
364328
db_table = 'iesg_login'
365-
class Admin:
366-
list_display = ('login_name', 'first_name', 'last_name', 'user_level')
367-
ordering = ['user_level','last_name']
368-
pass
369329

370330
class AreaDirector(models.Model):
371331
area = models.ForeignKey(Area, db_column='area_acronym_id', null=True)
@@ -379,8 +339,7 @@ def role(self):
379339
return "?%d? AD" % self.area_id
380340
class Meta:
381341
db_table = 'area_directors'
382-
class Admin:
383-
pass
342+
384343

385344
###
386345
# RFC tables
@@ -394,8 +353,6 @@ def __str__(self):
394353
class Meta:
395354
db_table = 'rfc_intend_status'
396355
verbose_name = 'RFC Intended Status Field'
397-
class Admin:
398-
pass
399356

400357
class RfcStatus(models.Model):
401358
status_id = models.AutoField(primary_key=True)
@@ -406,8 +363,6 @@ class Meta:
406363
db_table = 'rfc_status'
407364
verbose_name = 'RFC Status'
408365
verbose_name_plural = 'RFC Statuses'
409-
class Admin:
410-
pass
411366

412367
class Rfc(models.Model):
413368
ONLINE_CHOICES=(('YES', 'Yes'), ('NO', 'No'))
@@ -479,25 +434,6 @@ class Meta:
479434
db_table = 'rfcs'
480435
verbose_name = 'RFC'
481436
verbose_name_plural = 'RFCs'
482-
class Admin:
483-
search_fields = ['title']
484-
list_display = ['rfc_number', 'title']
485-
fields = (
486-
(None, {
487-
'fields': ('rfc_number', 'title', 'group_acronym', 'area_acronym', 'status', 'comments', 'last_modified_date')
488-
}),
489-
('Metadata', {
490-
'classes': 'collapse',
491-
'fields': (('online_version', 'txt_page_count'), ('fyi_number', 'std_number'))
492-
}),
493-
('Standards Track Dates', {
494-
'classes': 'collapse',
495-
'fields': ('rfc_published_date', ('proposed_date', 'draft_date'), ('standard_date', 'historic_date'))
496-
}),
497-
('Last Call / Ballot Info', {
498-
'classes': 'collapse',
499-
'fields': ('intended_status', ('lc_sent_date', 'lc_expiration_date'), ('b_sent_date', 'b_approve_date'))
500-
}))
501437

502438
class RfcAuthor(models.Model):
503439
rfc = models.ForeignKey(Rfc, unique=True, db_column='rfc_number', related_name='authors')
@@ -518,8 +454,6 @@ class Meta:
518454
db_table = 'rfcs_obsolete'
519455
verbose_name = 'RFC updates or obsoletes'
520456
verbose_name_plural = verbose_name
521-
class Admin:
522-
pass
523457

524458
## End RFC Tables
525459

@@ -557,8 +491,6 @@ def active_positions(self):
557491
return ret
558492
class Meta:
559493
db_table = 'ballot_info'
560-
class Admin:
561-
pass
562494

563495
class IDInternal(models.Model):
564496
"""
@@ -658,10 +590,6 @@ def docstate(self):
658590
class Meta:
659591
db_table = 'id_internal'
660592
verbose_name = 'IDTracker Draft'
661-
class Admin:
662-
list_display = ['draft', 'token_email', 'note' ]
663-
ordering = ['draft', ]
664-
pass
665593

666594
class DocumentComment(models.Model):
667595
BALLOT_CHOICES = (
@@ -734,8 +662,6 @@ class Meta:
734662
db_table = 'ballots'
735663
unique_together = (('ballot', 'ad'), )
736664
verbose_name = "IESG Ballot Position"
737-
class Admin:
738-
pass
739665

740666
class IESGComment(models.Model):
741667
ballot = models.ForeignKey(BallotInfo, related_name="comments")
@@ -753,8 +679,6 @@ class Meta:
753679
unique_together = (('ballot', 'ad'), )
754680
verbose_name = 'IESG Comment Text'
755681
verbose_name_plural = 'IESG Comments'
756-
class Admin:
757-
pass
758682

759683
class IESGDiscuss(models.Model):
760684
ballot = models.ForeignKey(BallotInfo, related_name="discusses")
@@ -772,8 +696,6 @@ class Meta:
772696
unique_together = (('ballot', 'ad'), )
773697
verbose_name = 'IESG Discuss Text'
774698
verbose_name_plural = 'IESG Discusses'
775-
class Admin:
776-
pass
777699

778700
class IDAuthor(models.Model):
779701
document = models.ForeignKey(InternetDraft, db_column='id_document_tag', related_name='authors')
@@ -840,11 +762,6 @@ class Meta:
840762
#unique_together = (('email_priority', 'person_or_org'), )
841763
# with this, I get 'ChangeManipulator' object has no attribute 'isUniqueemail_priority_person_or_org'
842764
verbose_name_plural = 'Email addresses'
843-
class Admin:
844-
# Even though this is edit_inline, we want to be able
845-
# to search for email addresses.
846-
search_fields = [ 'address' ]
847-
list_display = ( 'person_or_org', 'address', 'type', 'priority' )
848765

849766
class PhoneNumber(models.Model):
850767
person_or_org = models.ForeignKey(PersonOrOrgInfo, db_column='person_or_org_tag')
@@ -865,8 +782,6 @@ def __str__(self):
865782
return self.type
866783
class Meta:
867784
db_table = 'g_type'
868-
class Admin:
869-
pass
870785

871786
class WGStatus(models.Model):
872787
status_id = models.AutoField(primary_key=True)
@@ -875,8 +790,6 @@ def __str__(self):
875790
return self.status
876791
class Meta:
877792
db_table = 'g_status'
878-
class Admin:
879-
pass
880793

881794
class IETFWG(models.Model):
882795
ACTIVE = 1
@@ -943,14 +856,6 @@ class Meta:
943856
db_table = 'groups_ietf'
944857
ordering = ['?'] # workaround django wanting to sort by acronym but not joining with it
945858
verbose_name = 'IETF Working Group'
946-
class Admin:
947-
search_fields = ['group_acronym__acronym', 'group_acronym__name']
948-
# Until the database is consistent, including area_director in
949-
# this list means that we'll have FK failures, so skip it for now.
950-
list_display = ('group_acronym', 'group_type', 'status', 'area_acronym', 'start_date', 'concluded_date')
951-
list_filter = ['status', 'group_type']
952-
#list_display = ('group_acronym', 'group_type', 'status', 'area_director')
953-
#list_filter = ['status', 'group_type', 'area_director']
954859

955860
class WGChair(models.Model):
956861
person = models.ForeignKey(PersonOrOrgInfo, db_column='person_or_org_tag', unique=True)
@@ -1025,11 +930,6 @@ class Meta:
1025930
verbose_name = 'IETF WG Goal or Milestone'
1026931
verbose_name_plural = 'IETF WG Goals or Milestones'
1027932
ordering = ['expected_due_date']
1028-
class Admin:
1029-
list_display = ('group_acronym', 'description', 'expected_due_date', 'done')
1030-
date_hierarchy = 'expected_due_date'
1031-
list_filter = ['done']
1032-
pass
1033933

1034934

1035935
#### end wg stuff
@@ -1061,8 +961,6 @@ def role(self):
1061961
return self.role_name
1062962
class Meta:
1063963
db_table = 'chairs'
1064-
class Admin:
1065-
pass
1066964

1067965
class ChairsHistory(models.Model):
1068966
chair_type = models.ForeignKey(Role)
@@ -1074,9 +972,6 @@ def __str__(self):
1074972
return str(self.person)
1075973
class Meta:
1076974
db_table = 'chairs_history'
1077-
class Admin:
1078-
list_display = ('person', 'chair_type', 'start_year', 'end_year')
1079-
pass
1080975

1081976
#
1082977
# IRTF RG info
@@ -1091,8 +986,6 @@ def __str__(self):
1091986
class Meta:
1092987
db_table = 'irtf'
1093988
verbose_name="IRTF Research Group"
1094-
class Admin:
1095-
pass
1096989

1097990
class IRTFChair(models.Model):
1098991
irtf = models.ForeignKey(IRTF)

0 commit comments

Comments
 (0)