|
Revision 235:a8431b70960c, 406 bytes
(checked in by slav0nic <slav0nic0@…>, 7 months ago)
|
|
added hack for latest django-registration 0.8
|
| Line | |
|---|
| 1 | import re |
|---|
| 2 | from django import forms |
|---|
| 3 | from registration.forms import RegistrationFormUniqueEmail |
|---|
| 4 | |
|---|
| 5 | |
|---|
| 6 | class RegistrationFormUtfUsername(RegistrationFormUniqueEmail): |
|---|
| 7 | ''' |
|---|
| 8 | Allowed UTF8 logins with space |
|---|
| 9 | ''' |
|---|
| 10 | def __init__(self, *args, **kwargs): |
|---|
| 11 | super(RegistrationFormUtfUsername, self).__init__(*args, **kwargs) |
|---|
| 12 | self.fields['username'].regex = re.compile(r"^[\w\s-]+$", re.UNICODE) |
|---|
| 13 | |
|---|