mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-08-15 09:24:52 +03:00
Works well on 3.8 so far.
This commit is contained in:
parent
d4865711ec
commit
893e7ae958
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -215,3 +215,4 @@ tags
|
||||||
.idea/
|
.idea/
|
||||||
|
|
||||||
.pytest_cache/
|
.pytest_cache/
|
||||||
|
/out/
|
||||||
|
|
|
@ -12,7 +12,7 @@ repos:
|
||||||
rev: v3.3.1
|
rev: v3.3.1
|
||||||
hooks:
|
hooks:
|
||||||
- id: pyupgrade
|
- id: pyupgrade
|
||||||
args: [--py310-plus]
|
args: [--py38-plus]
|
||||||
exclude: hooks/
|
exclude: hooks/
|
||||||
|
|
||||||
- repo: https://github.com/psf/black
|
- repo: https://github.com/psf/black
|
||||||
|
|
|
@ -33,7 +33,7 @@ To run all tests using various versions of python in virtualenvs defined in tox.
|
||||||
It is possible to test with a specific version of python. To do this, the command
|
It is possible to test with a specific version of python. To do this, the command
|
||||||
is:
|
is:
|
||||||
|
|
||||||
$ tox -e py310
|
$ tox -e py38
|
||||||
|
|
||||||
This will run pytest with the python3.10 interpreter, for example.
|
This will run pytest with the python3.10 interpreter, for example.
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,8 @@
|
||||||
"windows": "n",
|
"windows": "n",
|
||||||
"use_pycharm": "n",
|
"use_pycharm": "n",
|
||||||
"use_docker": "n",
|
"use_docker": "n",
|
||||||
|
"use_sqlite": "n",
|
||||||
|
"use_postgresql": "n",
|
||||||
"postgresql_version": [
|
"postgresql_version": [
|
||||||
"14",
|
"14",
|
||||||
"13",
|
"13",
|
||||||
|
|
|
@ -14,6 +14,8 @@ Make sure to have the following on your host:
|
||||||
* Redis_, if using Celery
|
* Redis_, if using Celery
|
||||||
* Cookiecutter_
|
* Cookiecutter_
|
||||||
|
|
||||||
|
And if using Windows, you will also need the rust compiler.
|
||||||
|
|
||||||
First things first.
|
First things first.
|
||||||
|
|
||||||
#. Create a virtualenv: ::
|
#. Create a virtualenv: ::
|
||||||
|
|
|
@ -46,6 +46,9 @@ timezone:
|
||||||
windows:
|
windows:
|
||||||
Indicates whether the project should be configured for development on Windows.
|
Indicates whether the project should be configured for development on Windows.
|
||||||
|
|
||||||
|
use_sqlite:
|
||||||
|
Indicates whether the project should be configured for SQlite. Requires Windows.
|
||||||
|
|
||||||
use_pycharm:
|
use_pycharm:
|
||||||
Indicates whether the project should be configured for development with PyCharm_.
|
Indicates whether the project should be configured for development with PyCharm_.
|
||||||
|
|
||||||
|
|
2
tox.ini
2
tox.ini
|
@ -1,6 +1,6 @@
|
||||||
[tox]
|
[tox]
|
||||||
skipsdist = true
|
skipsdist = true
|
||||||
envlist = py310,black-template
|
envlist = py38,black-template
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
deps = -rrequirements.txt
|
deps = -rrequirements.txt
|
||||||
|
|
|
@ -13,7 +13,7 @@ repos:
|
||||||
rev: v3.3.1
|
rev: v3.3.1
|
||||||
hooks:
|
hooks:
|
||||||
- id: pyupgrade
|
- id: pyupgrade
|
||||||
args: [--py310-plus]
|
args: [--py38-plus]
|
||||||
|
|
||||||
- repo: https://github.com/psf/black
|
- repo: https://github.com/psf/black
|
||||||
rev: 23.1.0
|
rev: 23.1.0
|
||||||
|
|
|
@ -38,7 +38,7 @@ LOCALE_PATHS = [str(BASE_DIR / "locale")]
|
||||||
# DATABASES
|
# DATABASES
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
# https://docs.djangoproject.com/en/dev/ref/settings/#databases
|
# https://docs.djangoproject.com/en/dev/ref/settings/#databases
|
||||||
{% if cookiecutter.use_docker == "y" -%}
|
{% if cookiecutter.use_docker == "y" or cookiecutter.use_sqlite == "y" -%}
|
||||||
DATABASES = {"default": env.db("DATABASE_URL")}
|
DATABASES = {"default": env.db("DATABASE_URL")}
|
||||||
{%- else %}
|
{%- else %}
|
||||||
DATABASES = {
|
DATABASES = {
|
||||||
|
|
|
@ -2,11 +2,12 @@ pytz==2022.7.1 # https://github.com/stub42/pytz
|
||||||
python-slugify==8.0.0 # https://github.com/un33k/python-slugify
|
python-slugify==8.0.0 # https://github.com/un33k/python-slugify
|
||||||
Pillow==9.4.0 # https://github.com/python-pillow/Pillow
|
Pillow==9.4.0 # https://github.com/python-pillow/Pillow
|
||||||
{%- if cookiecutter.frontend_pipeline == 'Django Compressor' %}
|
{%- if cookiecutter.frontend_pipeline == 'Django Compressor' %}
|
||||||
{%- if cookiecutter.windows == 'y' and cookiecutter.use_docker == 'n' %}
|
# BUG: prevents Django Compressor from installing on windows. I was able to install rcssmin==1.1.1 without issues
|
||||||
rcssmin==1.1.0 --install-option="--without-c-extensions" # https://github.com/ndparker/rcssmin
|
# {#%- if cookiecutter.windows == 'y' and cookiecutter.use_docker == 'n' %#}
|
||||||
{%- else %}
|
# rcssmin==1.1.0 --install-option="--without-c-extensions" # https://github.com/ndparker/rcssmin
|
||||||
|
# {%- else %}
|
||||||
rcssmin==1.1.1 # https://github.com/ndparker/rcssmin
|
rcssmin==1.1.1 # https://github.com/ndparker/rcssmin
|
||||||
{%- endif %}
|
# {#%- endif %#}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
argon2-cffi==21.3.0 # https://github.com/hynek/argon2_cffi
|
argon2-cffi==21.3.0 # https://github.com/hynek/argon2_cffi
|
||||||
{%- if cookiecutter.use_whitenoise == 'y' %}
|
{%- if cookiecutter.use_whitenoise == 'y' %}
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
|
|
||||||
Werkzeug[watchdog]==2.2.2 # https://github.com/pallets/werkzeug
|
Werkzeug[watchdog]==2.2.2 # https://github.com/pallets/werkzeug
|
||||||
ipdb==0.13.11 # https://github.com/gotcha/ipdb
|
ipdb==0.13.11 # https://github.com/gotcha/ipdb
|
||||||
{%- if cookiecutter.use_docker == 'y' %}
|
{%- if cookiecutter.use_docker == 'y' and cookiecutter.use_postgresql == 'y' %}
|
||||||
psycopg2==2.9.5 # https://github.com/psycopg/psycopg2
|
psycopg2==2.9.5 # https://github.com/psycopg/psycopg2
|
||||||
{%- else %}
|
{%- elif cookiecutter.use_postgresql == 'y' %}
|
||||||
psycopg2-binary==2.9.5 # https://github.com/psycopg/psycopg2
|
psycopg2-binary==2.9.5 # https://github.com/psycopg/psycopg2
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- if cookiecutter.use_async == 'y' or cookiecutter.use_celery == 'y' %}
|
{%- if cookiecutter.use_async == 'y' or cookiecutter.use_celery == 'y' %}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user