diff options
author | Dan McGee <dan@archlinux.org> | 2013-11-06 20:56:15 -0600 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2013-11-06 20:56:15 -0600 |
commit | 3061d1c9515cd44ecc79f95c57b268564a481ccf (patch) | |
tree | 4d83689ecb28d359053cdcb810b1687821edc9bd | |
parent | d54df175a89385e50193447d02e6842e28c24f7d (diff) |
Django 1.6 upgrade, deprecation cleanup
PendingDeprecationWarning: Creating a ModelForm without either the 'fields' attribute or the 'exclude' attribute is deprecated - form needs updating
Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r-- | mirrors/admin.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/mirrors/admin.py b/mirrors/admin.py index d0f2f475..e35d9ce7 100644 --- a/mirrors/admin.py +++ b/mirrors/admin.py @@ -10,6 +10,7 @@ from .models import (Mirror, MirrorProtocol, MirrorUrl, MirrorRsync, class MirrorUrlForm(forms.ModelForm): class Meta: model = MirrorUrl + fields = ('url', 'country', 'active') def clean_url(self): # is this a valid-looking URL? @@ -39,6 +40,7 @@ class MirrorUrlInlineAdmin(admin.TabularInline): class MirrorRsyncForm(forms.ModelForm): class Meta: model = MirrorRsync + fields = ('ip',) class MirrorRsyncInlineAdmin(admin.TabularInline): @@ -50,6 +52,10 @@ class MirrorRsyncInlineAdmin(admin.TabularInline): class MirrorAdminForm(forms.ModelForm): class Meta: model = Mirror + fields = ('name', 'tier', 'upstream', 'admin_email', 'alternate_email', + 'public', 'active', 'isos', 'rsync_user', 'rsync_password', + 'notes') + upstream = forms.ModelChoiceField( queryset=Mirror.objects.filter(tier__gte=0, tier__lte=1), required=False) |