added proper db driver in requirements

This commit is contained in:
Abdullah Adeel 2022-01-09 22:10:32 +05:00
parent 781239cdd7
commit e97247108f
3 changed files with 10 additions and 1 deletions

View File

@ -18,7 +18,7 @@ HINT = "\x1b[3;33m"
SUCCESS = "\x1b[1;32m [SUCCESS]: " SUCCESS = "\x1b[1;32m [SUCCESS]: "
SUPPORTED_POSTGRES_VERSIONS = [ "14.1", "13.5", "12.9", "11.14", "10.19"] 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 }}" project_slug = "{{ cookiecutter.project_slug }}"
if hasattr(project_slug, "isidentifier"): if hasattr(project_slug, "isidentifier"):

View File

@ -2,11 +2,16 @@
Werkzeug==2.0.2 # https://github.com/pallets/werkzeug Werkzeug==2.0.2 # https://github.com/pallets/werkzeug
ipdb==0.13.9 # https://github.com/gotcha/ipdb ipdb==0.13.9 # https://github.com/gotcha/ipdb
{%- if cookiecutter.database_engine == "postgresql" %}
{%- if cookiecutter.use_docker == 'y' %} {%- if cookiecutter.use_docker == 'y' %}
psycopg2==2.9.3 # https://github.com/psycopg/psycopg2 psycopg2==2.9.3 # https://github.com/psycopg/psycopg2
{%- else %} {%- else %}
psycopg2-binary==2.9.3 # https://github.com/psycopg/psycopg2 psycopg2-binary==2.9.3 # https://github.com/psycopg/psycopg2
{%- endif %} {%- 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' %} {%- if cookiecutter.use_async == 'y' or cookiecutter.use_celery == 'y' %}
watchgod==0.7 # https://github.com/samuelcolvin/watchgod watchgod==0.7 # https://github.com/samuelcolvin/watchgod
{%- endif %} {%- endif %}

View File

@ -3,7 +3,11 @@
-r base.txt -r base.txt
gunicorn==20.1.0 # https://github.com/benoitc/gunicorn gunicorn==20.1.0 # https://github.com/benoitc/gunicorn
{%- if cookiecutter.database_engine == "postgresql" %}
psycopg2==2.9.3 # https://github.com/psycopg/psycopg2 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' %} {%- if cookiecutter.use_whitenoise == 'n' %}
Collectfast==2.2.0 # https://github.com/antonagestam/collectfast Collectfast==2.2.0 # https://github.com/antonagestam/collectfast
{%- endif %} {%- endif %}