From 7a952f09cff8c68fe1fa9dbd5a1200276db9f947 Mon Sep 17 00:00:00 2001 From: eric Date: Thu, 7 Apr 2016 20:39:23 -0400 Subject: [PATCH] patch form exclude syntax --- frontend/forms.py | 4 ++-- libraryauth/backends.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/frontend/forms.py b/frontend/forms.py index fc864bc3..0119f560 100644 --- a/frontend/forms.py +++ b/frontend/forms.py @@ -184,7 +184,7 @@ class EditionForm(forms.ModelForm): class Meta: model = Edition - exclude = 'created', 'work' + exclude = ('created', 'work') widgets = { 'title': forms.TextInput(attrs={'size': 40}), 'add_author': forms.TextInput(attrs={'size': 30}), @@ -269,7 +269,7 @@ def UserClaimForm ( user_instance, *args, **kwargs ): class Meta: model = Claim - exclude = 'status' + exclude = ('status',) widgets = { 'user': forms.HiddenInput, 'work': forms.HiddenInput, diff --git a/libraryauth/backends.py b/libraryauth/backends.py index 56ab57bf..c1f01c4c 100644 --- a/libraryauth/backends.py +++ b/libraryauth/backends.py @@ -47,7 +47,7 @@ class ip: class admin_form(forms.ModelForm): class Meta: model = Block - exclude = "library" + exclude = ("library",) class cardnum: def authenticate(self,request, library): @@ -70,7 +70,7 @@ class cardnum: class admin_form(forms.ModelForm): class Meta: model = CardPattern - exclude = "library" + exclude = ("library",) class form(forms.ModelForm): credential = forms.RegexField( @@ -119,4 +119,4 @@ class email: class admin_form(forms.ModelForm): class Meta: model = EmailPattern - exclude = "library" + exclude = ("library",)