From 1e479ba90dab2885abaa8eba9170400b1caa6f0e Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Mon, 15 Aug 2005 01:24:16 +0000 Subject: [PATCH] Fixed #93 and #279 -- 'django-admin startproject' no longer creates invalid settings/admin.py on Windows git-svn-id: http://code.djangoproject.com/svn/django/trunk@498 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/core/management.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/core/management.py b/django/core/management.py index 8b56ddd32b..6ce06e7182 100644 --- a/django/core/management.py +++ b/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.