incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tvansteenbu...@apache.org
Subject [46/50] git commit: (quickfix) Fix shortname validator for project importers due to previous refactor
Date Thu, 08 Aug 2013 13:35:05 GMT
(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/tv/6458
Commit: cb85a232a8b5759343b9a30c77d0f3cf79986bdc
Parents: 63e0935
Author: Cory Johns <cjohns@slashdotmedia.com>
Authored: Wed Aug 7 20:01:29 2013 +0000
Committer: Cory Johns <cjohns@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


Mime
View raw message