diff options
-rw-r--r-- | askbot/__init__.py | 1 | ||||
-rw-r--r-- | askbot/utils/forms.py | 5 |
2 files changed, 5 insertions, 1 deletions
diff --git a/askbot/__init__.py b/askbot/__init__.py index c79d19f9..59840ba8 100644 --- a/askbot/__init__.py +++ b/askbot/__init__.py @@ -33,6 +33,7 @@ REQUIREMENTS = { 'lamson': 'Lamson', 'pytz': 'pytz', 'tinymce': 'django-tinymce', + 'longerusername': 'longerusername' } #necessary for interoperability of django and coffin diff --git a/askbot/utils/forms.py b/askbot/utils/forms.py index a26fbcd5..7de555ef 100644 --- a/askbot/utils/forms.py +++ b/askbot/utils/forms.py @@ -8,6 +8,7 @@ from django.utils.safestring import mark_safe from askbot.conf import settings as askbot_settings from askbot.utils.slug import slugify from askbot import const +from longerusername import MAX_USERNAME_LENGTH import logging import urllib @@ -78,7 +79,9 @@ class UserNameField(StrippedNonEmptyCharField): if 'error_messages' in kw: error_messages.update(kw['error_messages']) del kw['error_messages'] - super(UserNameField,self).__init__(max_length=30, + + max_length = MAX_USERNAME_LENGTH + super(UserNameField,self).__init__(max_length=max_length, widget=forms.TextInput(attrs=login_form_widget_attrs), label=label, error_messages=error_messages, |