mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2024-11-24 02:24:07 +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))
|
||||
|
||||
|
||||
def remove_nginx_docker_files():
|
||||
shutil.rmtree(os.path.join("compose", "production", "nginx"))
|
||||
|
||||
|
||||
def remove_utility_files():
|
||||
shutil.rmtree("utility")
|
||||
|
||||
|
@ -457,6 +461,8 @@ def main():
|
|||
|
||||
if "{{ cookiecutter.use_docker }}".lower() == "y":
|
||||
remove_utility_files()
|
||||
if "{{ cookiecutter.cloud_provider }}".lower() != "none":
|
||||
remove_nginx_docker_files()
|
||||
else:
|
||||
remove_docker_files()
|
||||
|
||||
|
|
|
@ -170,7 +170,7 @@ STORAGES = {
|
|||
"BACKEND": "storages.backends.azure_storage.AzureStorage",
|
||||
"OPTIONS": {
|
||||
"location": "media",
|
||||
"file_overwrite": False,
|
||||
"overwrite_files": False,
|
||||
},
|
||||
},
|
||||
{%- if cookiecutter.use_whitenoise == 'y' %}
|
||||
|
@ -323,7 +323,7 @@ COMPRESS_FILTERS = {
|
|||
"js": ["compressor.filters.jsmin.JSMinFilter"],
|
||||
}
|
||||
{% endif %}
|
||||
{%- if cookiecutter.use_whitenoise == 'n' -%}
|
||||
{%- if cookiecutter.use_whitenoise == 'n' and cookiecutter.cloud_provider in ('AWS', 'GCP') -%}
|
||||
# Collectfasta
|
||||
# ------------------------------------------------------------------------------
|
||||
# https://github.com/jasongi/collectfasta#installation
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
gunicorn==23.0.0 # https://github.com/benoitc/gunicorn
|
||||
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
|
||||
{%- endif %}
|
||||
{%- if cookiecutter.use_sentry == "y" %}
|
||||
|
|
Loading…
Reference in New Issue
Block a user