Package: python-django-registration Version: 0.6-2.1 Severity: important Tags: patch
When using django-registration with django 1.0, it fails to import 'validators'. This has already been fixed upstream (r167, r168). The attached patch applies those changesets to the current package. -- System Information: Debian Release: lenny/sid APT prefers testing APT policy: (500, 'testing') Architecture: amd64 (x86_64) Kernel: Linux 2.6.16-xen (SMP w/1 CPU core) Locale: LANG=he_IL.UTF-8, LC_CTYPE=he_IL.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages python-django-registration depends on: ii python 2.5.2-2 An interactive high-level object-o ii python-django 1.0-1 A high-level Python Web framework ii python-support 0.8.4 automated rebuilding support for P python-django-registration recommends no packages. python-django-registration suggests no packages. -- no debconf information -- Tzafrir Cohen | [EMAIL PROTECTED] | VIM is http://tzafrir.org.il | | a Mutt's [EMAIL PROTECTED] | | best ICQ# 16849754 | | friend
django.core.validators was removed a while before 1.0 . This patch removes the need for it. It is taken from upstream: svn diff -r166:168 http://django-registration.googlecode.com/svn/trunk/ Index: registration/forms.py =================================================================== --- registration/forms.py (revision 166) +++ registration/forms.py (revision 168) @@ -5,7 +5,6 @@ from django import forms -from django.core.validators import alnum_re from django.utils.translation import ugettext_lazy as _ from django.contrib.auth.models import User @@ -33,9 +32,10 @@ ``RegistrationProfile.objects.create_inactive_user()``. """ - username = forms.CharField(max_length=30, - widget=forms.TextInput(attrs=attrs_dict), - label=_(u'username')) + username = forms.RegexField(regex=r'^\w+$', + max_length=30, + widget=forms.TextInput(attrs=attrs_dict), + label=_(u'username')) email = forms.EmailField(widget=forms.TextInput(attrs=dict(attrs_dict, maxlength=75)), label=_(u'email address')) @@ -50,8 +50,6 @@ in use. """ - if not alnum_re.search(self.cleaned_data['username']): - raise forms.ValidationError(_(u'Usernames can only contain letters, numbers and underscores')) try: user = User.objects.get(username__iexact=self.cleaned_data['username']) except User.DoesNotExist:
_______________________________________________ Python-modules-team mailing list Python-modules-team@lists.alioth.debian.org http://lists.alioth.debian.org/mailman/listinfo/python-modules-team