You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by jo...@apache.org on 2013/08/07 22:01:42 UTC

git commit: (quickfix) Fix shortname validator for project importers due to previous refactor

Updated Branches:
  refs/heads/master 63e09352f -> cb85a232a


(quickfix) Fix shortname validator for project importers due to previous refactor


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/cb85a232
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/cb85a232
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/cb85a232

Branch: refs/heads/master
Commit: cb85a232a8b5759343b9a30c77d0f3cf79986bdc
Parents: 63e0935
Author: Cory Johns <cj...@slashdotmedia.com>
Authored: Wed Aug 7 20:01:29 2013 +0000
Committer: Cory Johns <cj...@slashdotmedia.com>
Committed: Wed Aug 7 20:01:29 2013 +0000

----------------------------------------------------------------------
 ForgeImporters/forgeimporters/base.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/cb85a232/ForgeImporters/forgeimporters/base.py
----------------------------------------------------------------------
diff --git a/ForgeImporters/forgeimporters/base.py b/ForgeImporters/forgeimporters/base.py
index 3aea8c0..8cc3b52 100644
--- a/ForgeImporters/forgeimporters/base.py
+++ b/ForgeImporters/forgeimporters/base.py
@@ -27,7 +27,7 @@ from formencode import validators as fev, schema
 from allura.lib.decorators import require_post
 from allura.lib.decorators import task
 from allura.lib.security import require_access
-from allura.lib.widgets.forms import NeighborhoodProjectShortNameValidator
+from allura.lib.plugin import ProjectRegistrationProvider
 from allura.lib import exceptions
 
 from paste.deploy.converters import aslist
@@ -42,11 +42,12 @@ log = logging.getLogger(__name__)
 class ProjectImportForm(schema.Schema):
     def __init__(self, source):
         super(ProjectImportForm, self).__init__()
+        provider = ProjectRegistrationProvider.get()
         self.add_field('tools', ToolsValidator(source))
+        self.add_field('project_shortname', provider.shortname_validator)
 
     neighborhood = fev.PlainText(not_empty=True)
     project_name = fev.UnicodeString(not_empty=True, max=40)
-    project_shortname = NeighborhoodProjectShortNameValidator()
 
 
 @task