From a2482fc9180e21a345a9758955228437b31fa479 Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Fri, 6 May 2016 18:18:44 +0200 Subject: [PATCH] Fix #251 --- djangocms_installer/django/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/djangocms_installer/django/__init__.py b/djangocms_installer/django/__init__.py index cd02a24..2c489b1 100644 --- a/djangocms_installer/django/__init__.py +++ b/djangocms_installer/django/__init__.py @@ -218,7 +218,7 @@ def patch_settings(config_data): for item in overridden_settings: if config_data.django_version >= 1.9: - item_re = re.compile(r'%s = [^\]]+\)' % item, re.DOTALL | re.MULTILINE) + item_re = re.compile(r'%s = [^\]]+\]' % item, re.DOTALL | re.MULTILINE) else: item_re = re.compile(r'%s = [^\)]+\)' % item, re.DOTALL | re.MULTILINE) original = item_re.sub('', original) @@ -283,7 +283,7 @@ def _build_settings(config_data): dirs='os.path.join(BASE_DIR, \'%s\', \'templates\'),' % config_data.project_name )) - text.append('MIDDLEWARE_CLASSES = (\n%s%s\n)' % ( + text.append('MIDDLEWARE_CLASSES = [\n%s%s\n]' % ( spacer, (',\n' + spacer).join(['\'%s\'' % var for var in vars.MIDDLEWARE_CLASSES]))) apps = list(vars.INSTALLED_APPS) @@ -319,7 +319,7 @@ def _build_settings(config_data): apps.extend(vars.APPHOOK_RELOAD_APPLICATIONS) if config_data.reversion: apps.extend(vars.REVERSION_APPLICATIONS) - text.append('INSTALLED_APPS = (\n%s%s\n)' % ( + text.append('INSTALLED_APPS = [\n%s%s\n]' % ( spacer, (',\n' + spacer).join(['\'%s\'' % var for var in apps] + ['\'%s\'' % config_data.project_name]))) # NOQA text.append('LANGUAGES = (\n%s%s\n%s%s\n)' % (