Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed #93 and #279 -- 'django-admin startproject' no longer creates i…

…nvalid settings/admin.py on Windows

git-svn-id: http://code.djangoproject.com/svn/django/trunk@498 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 1e479ba90dab2885abaa8eba9170400b1caa6f0e 1 parent bc00059
@adrianholovaty adrianholovaty authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  django/core/management.py
View
2  django/core/management.py
@@ -361,7 +361,7 @@ def startproject(project_name, directory):
admin_settings_file = os.path.join(directory, project_name, 'settings/admin.py')
settings_contents = open(admin_settings_file, 'r').read()
fp = open(admin_settings_file, 'w')
- settings_contents = re.sub(r'(?s)\b(TEMPLATE_DIRS\s*=\s*\()(.*?)\)', "\\1\n '%s',\\2)" % ADMIN_TEMPLATE_DIR, settings_contents)
+ settings_contents = re.sub(r'(?s)\b(TEMPLATE_DIRS\s*=\s*\()(.*?)\)', "\\1\n r%r,\\2)" % ADMIN_TEMPLATE_DIR, settings_contents)
fp.write(settings_contents)
fp.close()
# Create a random SECRET_KEY hash, and put it in the main settings.
Please sign in to comment.
Something went wrong with that request. Please try again.