Skip to content

Commit 0006b9d

Browse files
committed
Make sure all model forms have a Meta.fields attribute
- Legacy-Id: 6927
1 parent 1cb6e70 commit 0006b9d

6 files changed

Lines changed: 10 additions & 2 deletions

File tree

ietf/doc/admin.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ def __init__(self, *args, **kwargs):
8787
self.fields["states"].widget.instance = self.instance
8888

8989
class Meta:
90+
fields = '__all__'
9091
model = Document
9192

9293
class DocumentAdmin(admin.ModelAdmin):

ietf/secr/areas/forms.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
class AWPForm(forms.ModelForm):
1717
class Meta:
1818
model = GroupURL
19+
fields = '__all__'
1920

2021
def __init__(self, *args, **kwargs):
2122
super(AWPForm, self).__init__(*args,**kwargs)

ietf/secr/ipradmin/forms.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ def save(self, *args, **kwargs):
254254
for doc in self.cleaned_data['id_filename']:
255255
#doc_alias = DocAlias.objects.get(id=doc)
256256
IprDocAlias.objects.create(ipr=ipr_detail,doc_alias=doc)
257-
257+
258258
return ipr_detail
259259

260260
class Meta:
@@ -326,3 +326,6 @@ class Meta:
326326
}),
327327
]
328328

329+
fields = []
330+
for n, d in fieldsets:
331+
fields += d["fields"]

ietf/secr/meetings/forms.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ def save(self, force_insert=False, force_update=False, commit=True):
109109
class MeetingRoomForm(forms.ModelForm):
110110
class Meta:
111111
model = Room
112+
fields = '__all__'
112113

113114
class ExtraSessionForm(forms.Form):
114115
no_notify = forms.BooleanField(required=False, label="Do NOT notify this action")

ietf/secr/rolodex/forms.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ def clean(self):
2525
class EmailForm(forms.ModelForm):
2626
class Meta:
2727
model = Email
28+
fields = '__all__'
2829

2930
class EditPersonForm(forms.ModelForm):
3031
class Meta:

ietf/secr/telechat/forms.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,5 @@ def __init__(self,*args,**kwargs):
4545
class IssueModelForm(forms.ModelForm):
4646
class Meta:
4747
model = TelechatAgendaItem
48-
48+
fields = '__all__'
49+

0 commit comments

Comments
 (0)