Skip to content


Verification for the project name #35

merged 2 commits into from

3 participants


Added verification for the project name in setup_project command as django's startproject command do.

Pinax Project member

Please use double quotes.

Pinax Project member

Thanks Darii.

@lukeman lukeman merged commit 5e72ace into pinax:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Showing with 5 additions and 1 deletion.
  1. +5 −1 pinax/core/management/commands/
6 pinax/core/management/commands/
@@ -91,7 +91,11 @@ def project_list(self):
def setup_project(self, destination, base, options):
user_project_name = os.path.basename(destination)
+ if not"^\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)
Something went wrong with that request. Please try again.