Fixed error when running manage.py collectstatic. Fixed #2861.

This commit is contained in:
Norman Jäckel 2017-01-18 15:32:47 +01:00
parent 3b58c76287
commit f271d8bb47
2 changed files with 3 additions and 0 deletions

1
.gitignore vendored
View File

@ -15,6 +15,7 @@ bower_components/*
# Local user data (settings, database, media, search index, static files) # Local user data (settings, database, media, search index, static files)
personal_data/* personal_data/*
openslides/static/* openslides/static/*
collected-static/*
# Package building/IDE # Package building/IDE
docs/_build/* docs/_build/*

View File

@ -253,6 +253,8 @@ def write_settings(settings_path=None, template=None, **context):
os.makedirs(settings_module) os.makedirs(settings_module)
with open(settings_path, 'w') as settings_file: with open(settings_path, 'w') as settings_file:
settings_file.write(content) 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) return os.path.realpath(settings_path)