aboutsummaryrefslogtreecommitdiff
path: root/rhodecode/model/forms.py
diff options
context:
space:
mode:
authorMarcin Kuzminski <marcin@python-works.com>2011-02-11 00:13:09 +0100
committerMarcin Kuzminski <marcin@python-works.com>2011-02-11 00:13:09 +0100
commitfb13566530f8256e50d082a0fa8a8d116f1e900a (patch)
tree7d116b79763ece455232b731fde219207096bf02 /rhodecode/model/forms.py
parent647ec8586690192ee022ec9f1f3293c81b3fbf5d (diff)
Code refactor number 2
--HG-- branch : beta
Diffstat (limited to 'rhodecode/model/forms.py')
-rw-r--r--rhodecode/model/forms.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/rhodecode/model/forms.py b/rhodecode/model/forms.py
index 35fcf45d..02c742ea 100644
--- a/rhodecode/model/forms.py
+++ b/rhodecode/model/forms.py
@@ -29,8 +29,9 @@ from formencode.validators import UnicodeString, OneOf, Int, Number, Regex, \
Email, Bool, StringBoolean, Set
from pylons.i18n.translation import _
+from webhelpers.pylonslib.secure_form import authentication_token
-import rhodecode.lib.helpers as h
+from rhodecode.lib.utils import repo_name_slug
from rhodecode.lib.auth import authenticate, get_crypt_password
from rhodecode.lib.exceptions import LdapImportError
from rhodecode.model import meta
@@ -40,8 +41,6 @@ from rhodecode.model.users_group import UsersGroupModel
from rhodecode.model.db import User, UsersGroup
from rhodecode import BACKENDS
-from webhelpers.pylonslib.secure_form import authentication_token
-
log = logging.getLogger(__name__)
#this is needed to translate the messages using _() in validators
@@ -214,7 +213,7 @@ def ValidRepoName(edit, old_data):
class _ValidRepoName(formencode.validators.FancyValidator):
def to_python(self, value, state):
- slug = h.repo_name_slug(value)
+ slug = repo_name_slug(value)
if slug in ['_admin']:
raise formencode.Invalid(_('This repository name is disallowed'),
value, state)