Regularize use of ModelForm in ietfauth.forms, a cosmetic change,
probably a left-over from way back - Legacy-Id: 11932
This commit is contained in:
parent
aac9578d7d
commit
ea6a016ee2
|
@ -3,7 +3,6 @@ import re
|
|||
from django import forms
|
||||
from django.conf import settings
|
||||
from django.core.exceptions import ValidationError
|
||||
from django.forms import ModelForm
|
||||
from django.db import models
|
||||
from django.contrib.auth.models import User
|
||||
from django.utils.html import mark_safe
|
||||
|
@ -68,13 +67,13 @@ def get_person_form(*args, **kwargs):
|
|||
if not roles:
|
||||
exclude_list += ['biography', 'photo', ]
|
||||
|
||||
class PersonForm(ModelForm):
|
||||
class PersonForm(forms.ModelForm):
|
||||
class Meta:
|
||||
model = Person
|
||||
exclude = exclude_list
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(ModelForm, self).__init__(*args, **kwargs)
|
||||
super(forms.ModelForm, self).__init__(*args, **kwargs)
|
||||
|
||||
# blank ascii if it's the same as name
|
||||
self.fields["ascii"].required = self.fields["ascii"].widget.is_required = False
|
||||
|
@ -161,7 +160,7 @@ class ResetPasswordForm(forms.Form):
|
|||
class TestEmailForm(forms.Form):
|
||||
email = forms.EmailField(required=False)
|
||||
|
||||
class WhitelistForm(ModelForm):
|
||||
class WhitelistForm(forms.ModelForm):
|
||||
class Meta:
|
||||
model = Whitelisted
|
||||
exclude = ['by', 'time' ]
|
||||
|
|
Loading…
Reference in a new issue