diff --git a/hooks/pre_gen_project.py b/hooks/pre_gen_project.py index 52fb79a80..ff8207ed9 100644 --- a/hooks/pre_gen_project.py +++ b/hooks/pre_gen_project.py @@ -18,7 +18,7 @@ HINT = "\x1b[3;33m" SUCCESS = "\x1b[1;32m [SUCCESS]: " SUPPORTED_POSTGRES_VERSIONS = [ "14.1", "13.5", "12.9", "11.14", "10.19"] -SUPPORTED_MYSQL_VERSIONS = [ "5.7", "5.6" ] +SUPPORTED_MYSQL_VERSIONS = [ "5.7" ] project_slug = "{{ cookiecutter.project_slug }}" if hasattr(project_slug, "isidentifier"): diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index 5d042653c..00bd56cc1 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -2,11 +2,16 @@ Werkzeug==2.0.2 # https://github.com/pallets/werkzeug ipdb==0.13.9 # https://github.com/gotcha/ipdb +{%- if cookiecutter.database_engine == "postgresql" %} {%- if cookiecutter.use_docker == 'y' %} psycopg2==2.9.3 # https://github.com/psycopg/psycopg2 {%- else %} psycopg2-binary==2.9.3 # https://github.com/psycopg/psycopg2 {%- endif %} +{%- endif %} +{%- if cookiecutter.database_engine == "mysql" %} +mysqlclient==2.1.0 # https://github.com/PyMySQL/mysqlclient +{%- endif %} {%- if cookiecutter.use_async == 'y' or cookiecutter.use_celery == 'y' %} watchgod==0.7 # https://github.com/samuelcolvin/watchgod {%- endif %} diff --git a/{{cookiecutter.project_slug}}/requirements/production.txt b/{{cookiecutter.project_slug}}/requirements/production.txt index e7ca7fb28..25404ed5d 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -3,7 +3,11 @@ -r base.txt gunicorn==20.1.0 # https://github.com/benoitc/gunicorn +{%- if cookiecutter.database_engine == "postgresql" %} psycopg2==2.9.3 # https://github.com/psycopg/psycopg2 +{%- elif cookiecutter.database_engine == "mysql" %} +mysqlclient==2.1.0 # https://github.com/PyMySQL/mysqlclient +{%- endif %} {%- if cookiecutter.use_whitenoise == 'n' %} Collectfast==2.2.0 # https://github.com/antonagestam/collectfast {%- endif %}