root/djangobb/forms.py

Revision 235:a8431b70960c, 406 bytes (checked in by slav0nic <slav0nic0@…>, 7 months ago)

added hack for latest django-registration 0.8

Line 
1import re
2from django import forms
3from registration.forms import RegistrationFormUniqueEmail
4
5
6class 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
Note: See TracBrowser for help on using the browser.