Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
Adrian Holovaty authored August 15, 2005

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  django/core/management.py
2  django/core/management.py
@@ -361,7 +361,7 @@ def startproject(project_name, directory):
361 361
     admin_settings_file = os.path.join(directory, project_name, 'settings/admin.py')
362 362
     settings_contents = open(admin_settings_file, 'r').read()
363 363
     fp = open(admin_settings_file, 'w')
364  
-    settings_contents = re.sub(r'(?s)\b(TEMPLATE_DIRS\s*=\s*\()(.*?)\)', "\\1\n    '%s',\\2)" % ADMIN_TEMPLATE_DIR, settings_contents)
  364
+    settings_contents = re.sub(r'(?s)\b(TEMPLATE_DIRS\s*=\s*\()(.*?)\)', "\\1\n    r%r,\\2)" % ADMIN_TEMPLATE_DIR, settings_contents)
365 365
     fp.write(settings_contents)
366 366
     fp.close()
367 367
     # Create a random SECRET_KEY hash, and put it in the main settings.

0 notes on commit 1e479ba

Please sign in to comment.
Something went wrong with that request. Please try again.