App Engine Python SDK version 1.7.4 (2)
[gae.git] / python / lib / django_1_4 / tests / regressiontests / admin_views / forms.py
blobe8493df95b677929a4492a14b7f1b152ab2ee7f9
1 from django import forms
2 from django.contrib.admin.forms import AdminAuthenticationForm
5 class CustomAdminAuthenticationForm(AdminAuthenticationForm):
7 def clean_username(self):
8 username = self.cleaned_data.get('username')
9 if username == 'customform':
10 raise forms.ValidationError('custom form error')
11 return username