Permalink
Browse files

Merge pull request #35 from DNX/master

Verification for the project name
  • Loading branch information...
2 parents 310c894 + 955924d commit 5e72ace0010af6dc0fad01ed45cb05ddaa05aa4c @lukeman lukeman committed Jan 21, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 pinax/core/management/commands/setup_project.py
@@ -91,7 +91,11 @@ def project_list(self):
def setup_project(self, destination, base, options):
user_project_name = os.path.basename(destination)
-
+
+ if not re.search(r"^\w+$", user_project_name):
+ sys.stderr.write("Error: %r is not a valid app name. Please use only numbers, letters and underscores.\n" % (user_project_name))
+ sys.exit(1)
+
if os.path.exists(destination):
raise CommandError("Destination path already exists [%s]" % destination)

0 comments on commit 5e72ace

Please sign in to comment.