Skip to content

Commit

Permalink
Merge pull request #252 from nephila/feature/fix_dj19
Browse files Browse the repository at this point in the history
Fix #251
  • Loading branch information
yakky committed May 6, 2016
2 parents e8e48e1 + a2482fc commit 3b492f4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions djangocms_installer/django/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)' % (
Expand Down

0 comments on commit 3b492f4

Please sign in to comment.