|
3 | 3 | from django import forms |
4 | 4 | from django.conf import settings |
5 | 5 | from django.core.exceptions import ValidationError |
6 | | -from django.forms import ModelForm |
7 | 6 | from django.db import models |
8 | 7 | from django.contrib.auth.models import User |
9 | 8 | from django.utils.html import mark_safe |
@@ -68,13 +67,13 @@ def get_person_form(*args, **kwargs): |
68 | 67 | if not roles: |
69 | 68 | exclude_list += ['biography', 'photo', ] |
70 | 69 |
|
71 | | - class PersonForm(ModelForm): |
| 70 | + class PersonForm(forms.ModelForm): |
72 | 71 | class Meta: |
73 | 72 | model = Person |
74 | 73 | exclude = exclude_list |
75 | 74 |
|
76 | 75 | def __init__(self, *args, **kwargs): |
77 | | - super(ModelForm, self).__init__(*args, **kwargs) |
| 76 | + super(forms.ModelForm, self).__init__(*args, **kwargs) |
78 | 77 |
|
79 | 78 | # blank ascii if it's the same as name |
80 | 79 | self.fields["ascii"].required = self.fields["ascii"].widget.is_required = False |
@@ -161,7 +160,7 @@ def clean_username(self): |
161 | 160 | class TestEmailForm(forms.Form): |
162 | 161 | email = forms.EmailField(required=False) |
163 | 162 |
|
164 | | -class WhitelistForm(ModelForm): |
| 163 | +class WhitelistForm(forms.ModelForm): |
165 | 164 | class Meta: |
166 | 165 | model = Whitelisted |
167 | 166 | exclude = ['by', 'time' ] |
|
0 commit comments