mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2024-11-22 01:26:57 +03:00
Fix a number of issues with Azure storage (#5476)
This commit is contained in:
parent
1b83a472ec
commit
6f5f1b8576
|
@ -91,6 +91,10 @@ def remove_docker_files():
|
||||||
os.remove(os.path.join(".idea", "runConfigurations", file_name))
|
os.remove(os.path.join(".idea", "runConfigurations", file_name))
|
||||||
|
|
||||||
|
|
||||||
|
def remove_nginx_docker_files():
|
||||||
|
shutil.rmtree(os.path.join("compose", "production", "nginx"))
|
||||||
|
|
||||||
|
|
||||||
def remove_utility_files():
|
def remove_utility_files():
|
||||||
shutil.rmtree("utility")
|
shutil.rmtree("utility")
|
||||||
|
|
||||||
|
@ -457,6 +461,8 @@ def main():
|
||||||
|
|
||||||
if "{{ cookiecutter.use_docker }}".lower() == "y":
|
if "{{ cookiecutter.use_docker }}".lower() == "y":
|
||||||
remove_utility_files()
|
remove_utility_files()
|
||||||
|
if "{{ cookiecutter.cloud_provider }}".lower() != "none":
|
||||||
|
remove_nginx_docker_files()
|
||||||
else:
|
else:
|
||||||
remove_docker_files()
|
remove_docker_files()
|
||||||
|
|
||||||
|
|
|
@ -170,7 +170,7 @@ STORAGES = {
|
||||||
"BACKEND": "storages.backends.azure_storage.AzureStorage",
|
"BACKEND": "storages.backends.azure_storage.AzureStorage",
|
||||||
"OPTIONS": {
|
"OPTIONS": {
|
||||||
"location": "media",
|
"location": "media",
|
||||||
"file_overwrite": False,
|
"overwrite_files": False,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{%- if cookiecutter.use_whitenoise == 'y' %}
|
{%- if cookiecutter.use_whitenoise == 'y' %}
|
||||||
|
@ -323,7 +323,7 @@ COMPRESS_FILTERS = {
|
||||||
"js": ["compressor.filters.jsmin.JSMinFilter"],
|
"js": ["compressor.filters.jsmin.JSMinFilter"],
|
||||||
}
|
}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{%- if cookiecutter.use_whitenoise == 'n' -%}
|
{%- if cookiecutter.use_whitenoise == 'n' and cookiecutter.cloud_provider in ('AWS', 'GCP') -%}
|
||||||
# Collectfasta
|
# Collectfasta
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
# https://github.com/jasongi/collectfasta#installation
|
# https://github.com/jasongi/collectfasta#installation
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
gunicorn==23.0.0 # https://github.com/benoitc/gunicorn
|
gunicorn==23.0.0 # https://github.com/benoitc/gunicorn
|
||||||
psycopg[c]==3.2.3 # https://github.com/psycopg/psycopg
|
psycopg[c]==3.2.3 # https://github.com/psycopg/psycopg
|
||||||
{%- if cookiecutter.use_whitenoise == 'n' %}
|
{%- if cookiecutter.use_whitenoise == 'n'and cookiecutter.cloud_provider in ('AWS', 'GCP') %}
|
||||||
Collectfasta==3.2.0 # https://github.com/jasongi/collectfasta
|
Collectfasta==3.2.0 # https://github.com/jasongi/collectfasta
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- if cookiecutter.use_sentry == "y" %}
|
{%- if cookiecutter.use_sentry == "y" %}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user