From c9744497c90db88ea85246607215e21008b42ca1 Mon Sep 17 00:00:00 2001 From: Andrew-Chen-Wang Date: Tue, 24 Mar 2020 21:53:53 -0400 Subject: [PATCH] Added gunicorn to base.txt requirements for async work --- {{cookiecutter.project_slug}}/requirements/base.txt | 3 ++- {{cookiecutter.project_slug}}/requirements/production.txt | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/{{cookiecutter.project_slug}}/requirements/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt index ec861f35..2d47c6e1 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -16,8 +16,9 @@ django-celery-beat==2.0.0 # https://github.com/celery/django-celery-beat flower==0.9.3 # https://github.com/mher/flower {%- endif %} {%- endif %} -{%- if cookiecutter.use_async %} +{%- if cookiecutter.use_async == 'y' %} uvicorn==0.11.3 # https://github.com/encode/uvicorn +gunicorn==20.0.4 # https://github.com/benoitc/gunicorn {%- endif %} # Django diff --git a/{{cookiecutter.project_slug}}/requirements/production.txt b/{{cookiecutter.project_slug}}/requirements/production.txt index a8bc31dc..75ae8c30 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -2,8 +2,10 @@ -r ./base.txt -gunicorn==20.0.4 # https://github.com/benoitc/gunicorn psycopg2==2.8.4 --no-binary psycopg2 # https://github.com/psycopg/psycopg2 +{%- if cookiecutter.use_async == 'n' %} +gunicorn==20.0.4 # https://github.com/benoitc/gunicorn +{%- endif %} {%- if cookiecutter.use_whitenoise == 'n' %} Collectfast==2.1.0 # https://github.com/antonagestam/collectfast {%- endif %}