Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

#!/usr/bin/python 

from registration.forms import RegistrationForm 

from django import forms 

 

attrs_dict = { 

        'class': 'required', 

#        'onchange':'alert("check your self, fool");' 

} 

 

class MadronaRegistrationForm(RegistrationForm): 

    username = forms.RegexField(regex=r'^\w+$', 

        max_length=30, 

        widget=forms.TextInput(attrs=attrs_dict), 

        label="Username", 

        error_messages={'invalid': "Username can contain only letters, numbers or underscores (spaces are not permitted)."})