From f271d8bb477c0584d330628471e5e7209932f795 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Norman=20J=C3=A4ckel?= Date: Wed, 18 Jan 2017 15:32:47 +0100 Subject: [PATCH] Fixed error when running manage.py collectstatic. Fixed #2861. --- .gitignore | 1 + openslides/utils/main.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 335be371b..08830b22c 100644 --- a/.gitignore +++ b/.gitignore @@ -15,6 +15,7 @@ bower_components/* # Local user data (settings, database, media, search index, static files) personal_data/* openslides/static/* +collected-static/* # Package building/IDE docs/_build/* diff --git a/openslides/utils/main.py b/openslides/utils/main.py index 2a420fa32..697837402 100644 --- a/openslides/utils/main.py +++ b/openslides/utils/main.py @@ -253,6 +253,8 @@ def write_settings(settings_path=None, template=None, **context): os.makedirs(settings_module) with open(settings_path, 'w') as settings_file: settings_file.write(content) + openslides_user_data_path = context['openslides_user_data_path'].strip("'") + os.makedirs(os.path.join(openslides_user_data_path, 'static'), exist_ok=True) return os.path.realpath(settings_path)