Merge branch 'master' into feat/webpack-rebased

This commit is contained in:
Bruno Alla 2023-01-27 20:55:44 +00:00
commit 51a9417418
No known key found for this signature in database
14 changed files with 97 additions and 27 deletions

View File

@ -1347,5 +1347,15 @@
"name": "Robin", "name": "Robin",
"github_login": "Kaffeetasse", "github_login": "Kaffeetasse",
"twitter_username": "" "twitter_username": ""
},
{
"name": "Patrick Tran",
"github_login": "theptrk",
"twitter_username": ""
},
{
"name": "tildebox",
"github_login": "tildebox",
"twitter_username": ""
} }
] ]

View File

@ -3,6 +3,52 @@ All enhancements and patches to Cookiecutter Django will be documented in this f
<!-- GENERATOR_PLACEHOLDER --> <!-- GENERATOR_PLACEHOLDER -->
## 2023.01.26
### Changed
- Rename BASE_DIR_PATH to BASE_DIR ([#4102](https://github.com/cookiecutter/cookiecutter-django/pull/4102))
### Updated
- Update pre-commit to 3.0.1 ([#4104](https://github.com/cookiecutter/cookiecutter-django/pull/4104))
- Update tox to 4.4.2 ([#4101](https://github.com/cookiecutter/cookiecutter-django/pull/4101))
## 2023.01.25
### Changed
- Rename ROOT_DIR to BASE_DIR ([#4086](https://github.com/cookiecutter/cookiecutter-django/pull/4086))
- Update postgres and redis to point to mini tiers ([#4099](https://github.com/cookiecutter/cookiecutter-django/pull/4099))
### Updated
- Update coverage to 7.1.0 ([#4100](https://github.com/cookiecutter/cookiecutter-django/pull/4100))
## 2023.01.24
### Updated
- Update pre-commit to 3.0.0 ([#4098](https://github.com/cookiecutter/cookiecutter-django/pull/4098))
## 2023.01.23
### Updated
- Update sentry-sdk to 1.14.0 ([#4096](https://github.com/cookiecutter/cookiecutter-django/pull/4096))
## 2023.01.22
### Updated
- Update django-compressor to 4.3.1 ([#4094](https://github.com/cookiecutter/cookiecutter-django/pull/4094))
## 2023.01.21
### Updated
- Update django-stubs to 1.13.2 ([#4093](https://github.com/cookiecutter/cookiecutter-django/pull/4093))
## 2023.01.19
### Fixed
- Add sourcemaps support to Gulp ([#4089](https://github.com/cookiecutter/cookiecutter-django/pull/4089))
### Updated
- Update coverage to 7.0.5 ([#4092](https://github.com/cookiecutter/cookiecutter-django/pull/4092))
- Update redis to 4.4.2 ([#4091](https://github.com/cookiecutter/cookiecutter-django/pull/4091))
- Update requests to 2.28.2 ([#4090](https://github.com/cookiecutter/cookiecutter-django/pull/4090))
- Update tox to 4.3.5 ([#4087](https://github.com/cookiecutter/cookiecutter-django/pull/4087))
## 2023.01.17 ## 2023.01.17
### Updated ### Updated

View File

@ -1475,6 +1475,13 @@ Listed in alphabetical order.
</td> </td>
<td></td> <td></td>
</tr> </tr>
<tr>
<td>Patrick Tran</td>
<td>
<a href="https://github.com/theptrk">theptrk</a>
</td>
<td></td>
</tr>
<tr> <tr>
<td>Pawan Chaurasia</td> <td>Pawan Chaurasia</td>
<td> <td>
@ -1734,6 +1741,13 @@ Listed in alphabetical order.
</td> </td>
<td></td> <td></td>
</tr> </tr>
<tr>
<td>tildebox</td>
<td>
<a href="https://github.com/tildebox">tildebox</a>
</td>
<td></td>
</tr>
<tr> <tr>
<td>Tim Claessens</td> <td>Tim Claessens</td>
<td> <td>

View File

@ -12,13 +12,13 @@ Run these commands to deploy the project to Heroku:
heroku create --buildpack heroku/python heroku create --buildpack heroku/python
heroku addons:create heroku-postgresql:hobby-dev heroku addons:create heroku-postgresql:mini
# On Windows use double quotes for the time zone, e.g. # On Windows use double quotes for the time zone, e.g.
# heroku pg:backups schedule --at "02:00 America/Los_Angeles" DATABASE_URL # heroku pg:backups schedule --at "02:00 America/Los_Angeles" DATABASE_URL
heroku pg:backups schedule --at '02:00 America/Los_Angeles' DATABASE_URL heroku pg:backups schedule --at '02:00 America/Los_Angeles' DATABASE_URL
heroku pg:promote DATABASE_URL heroku pg:promote DATABASE_URL
heroku addons:create heroku-redis:hobby-dev heroku addons:create heroku-redis:mini
# Assuming you chose Mailgun as mail service (see below for others) # Assuming you chose Mailgun as mail service (see below for others)
heroku addons:create mailgun:starter heroku addons:create mailgun:starter
@ -125,4 +125,4 @@ which run the SASS compilation & JS bundling.
If things don't work, please refer to the Heroku docs. If things don't work, please refer to the Heroku docs.
.. _multiple buildpacks: https://devcenter.heroku.com/articles/using-multiple-buildpacks-for-an-app .. _multiple buildpacks: https://devcenter.heroku.com/articles/using-multiple-buildpacks-for-an-app

View File

@ -8,11 +8,11 @@ black==22.12.0
isort==5.11.4 isort==5.11.4
flake8==6.0.0 flake8==6.0.0
flake8-isort==6.0.0 flake8-isort==6.0.0
pre-commit==2.21.0 pre-commit==3.0.1
# Testing # Testing
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
tox==4.3.3 tox==4.4.2
pytest==7.2.1 pytest==7.2.1
pytest-cookies==0.6.1 pytest-cookies==0.6.1
pytest-instafail==0.4.2 pytest-instafail==0.4.2
@ -23,4 +23,4 @@ pyyaml==6.0
PyGithub==1.57 PyGithub==1.57
gitpython==3.1.30 gitpython==3.1.30
jinja2==3.1.2 jinja2==3.1.2
requests==2.28.1 requests==2.28.2

View File

@ -5,7 +5,7 @@ except ImportError:
from distutils.core import setup from distutils.core import setup
# We use calendar versioning # We use calendar versioning
version = "2023.01.17" version = "2023.01.26"
with open("README.rst") as readme_file: with open("README.rst") as readme_file:
long_description = readme_file.read() long_description = readme_file.read()

View File

@ -135,11 +135,11 @@ def _fixture_id(ctx):
return "-".join(f"{key}:{value}" for key, value in ctx.items()) return "-".join(f"{key}:{value}" for key, value in ctx.items())
def build_files_list(root_dir): def build_files_list(base_dir):
"""Build a list containing absolute paths to the generated files.""" """Build a list containing absolute paths to the generated files."""
return [ return [
os.path.join(dirpath, file_path) os.path.join(dirpath, file_path)
for dirpath, subdirs, files in os.walk(root_dir) for dirpath, subdirs, files in os.walk(base_dir)
for file_path in files for file_path in files
] ]

View File

@ -15,8 +15,8 @@ from django.core.asgi import get_asgi_application
# This allows easy placement of apps within the interior # This allows easy placement of apps within the interior
# {{ cookiecutter.project_slug }} directory. # {{ cookiecutter.project_slug }} directory.
ROOT_DIR = Path(__file__).resolve(strict=True).parent.parent BASE_DIR = Path(__file__).resolve(strict=True).parent.parent
sys.path.append(str(ROOT_DIR / "{{ cookiecutter.project_slug }}")) sys.path.append(str(BASE_DIR / "{{ cookiecutter.project_slug }}"))
# If DJANGO_SETTINGS_MODULE is unset, default to the local settings # If DJANGO_SETTINGS_MODULE is unset, default to the local settings
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings.local") os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings.local")

View File

@ -5,15 +5,15 @@ from pathlib import Path
import environ import environ
ROOT_DIR = Path(__file__).resolve(strict=True).parent.parent.parent BASE_DIR = Path(__file__).resolve(strict=True).parent.parent.parent
# {{ cookiecutter.project_slug }}/ # {{ cookiecutter.project_slug }}/
APPS_DIR = ROOT_DIR / "{{ cookiecutter.project_slug }}" APPS_DIR = BASE_DIR / "{{ cookiecutter.project_slug }}"
env = environ.Env() env = environ.Env()
READ_DOT_ENV_FILE = env.bool("DJANGO_READ_DOT_ENV_FILE", default=False) READ_DOT_ENV_FILE = env.bool("DJANGO_READ_DOT_ENV_FILE", default=False)
if READ_DOT_ENV_FILE: if READ_DOT_ENV_FILE:
# OS environment variables take precedence over variables from .env # OS environment variables take precedence over variables from .env
env.read_env(str(ROOT_DIR / ".env")) env.read_env(str(BASE_DIR / ".env"))
# GENERAL # GENERAL
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
@ -33,7 +33,7 @@ USE_I18N = True
# https://docs.djangoproject.com/en/dev/ref/settings/#use-tz # https://docs.djangoproject.com/en/dev/ref/settings/#use-tz
USE_TZ = True USE_TZ = True
# https://docs.djangoproject.com/en/dev/ref/settings/#locale-paths # https://docs.djangoproject.com/en/dev/ref/settings/#locale-paths
LOCALE_PATHS = [str(ROOT_DIR / "locale")] LOCALE_PATHS = [str(BASE_DIR / "locale")]
# DATABASES # DATABASES
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
@ -162,7 +162,7 @@ MIDDLEWARE = [
# STATIC # STATIC
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# https://docs.djangoproject.com/en/dev/ref/settings/#static-root # https://docs.djangoproject.com/en/dev/ref/settings/#static-root
STATIC_ROOT = str(ROOT_DIR / "staticfiles") STATIC_ROOT = str(BASE_DIR / "staticfiles")
# https://docs.djangoproject.com/en/dev/ref/settings/#static-url # https://docs.djangoproject.com/en/dev/ref/settings/#static-url
STATIC_URL = "/static/" STATIC_URL = "/static/"
# https://docs.djangoproject.com/en/dev/ref/contrib/staticfiles/#std:setting-STATICFILES_DIRS # https://docs.djangoproject.com/en/dev/ref/contrib/staticfiles/#std:setting-STATICFILES_DIRS

View File

@ -21,8 +21,8 @@ from django.core.wsgi import get_wsgi_application
# This allows easy placement of apps within the interior # This allows easy placement of apps within the interior
# {{ cookiecutter.project_slug }} directory. # {{ cookiecutter.project_slug }} directory.
ROOT_DIR = Path(__file__).resolve(strict=True).parent.parent BASE_DIR = Path(__file__).resolve(strict=True).parent.parent
sys.path.append(str(ROOT_DIR / "{{ cookiecutter.project_slug }}")) sys.path.append(str(BASE_DIR / "{{ cookiecutter.project_slug }}"))
# We defer to a DJANGO_SETTINGS_MODULE already in the environment. This breaks # We defer to a DJANGO_SETTINGS_MODULE already in the environment. This breaks
# if running multiple sites in the same mod_wsgi process. To fix this, use # if running multiple sites in the same mod_wsgi process. To fix this, use
# mod_wsgi daemon mode with each site in its own daemon process, or use # mod_wsgi daemon mode with each site in its own daemon process, or use

View File

@ -4,13 +4,13 @@ from pathlib import Path
import pytest import pytest
ROOT_DIR_PATH = Path(__file__).parent.resolve() BASE_DIR = Path(__file__).parent.resolve()
PRODUCTION_DOTENVS_DIR_PATH = ROOT_DIR_PATH / ".envs" / ".production" PRODUCTION_DOTENVS_DIR_PATH = BASE_DIR / ".envs" / ".production"
PRODUCTION_DOTENV_FILE_PATHS = [ PRODUCTION_DOTENV_FILE_PATHS = [
PRODUCTION_DOTENVS_DIR_PATH / ".django", PRODUCTION_DOTENVS_DIR_PATH / ".django",
PRODUCTION_DOTENVS_DIR_PATH / ".postgres", PRODUCTION_DOTENVS_DIR_PATH / ".postgres",
] ]
DOTENV_FILE_PATH = ROOT_DIR_PATH / ".env" DOTENV_FILE_PATH = BASE_DIR / ".env"
def merge( def merge(

View File

@ -12,7 +12,7 @@ argon2-cffi==21.3.0 # https://github.com/hynek/argon2_cffi
{%- if cookiecutter.use_whitenoise == 'y' %} {%- if cookiecutter.use_whitenoise == 'y' %}
whitenoise==6.3.0 # https://github.com/evansd/whitenoise whitenoise==6.3.0 # https://github.com/evansd/whitenoise
{%- endif %} {%- endif %}
redis==4.4.1 # https://github.com/redis/redis-py redis==4.4.2 # https://github.com/redis/redis-py
{%- if cookiecutter.use_docker == "y" or cookiecutter.windows == "n" %} {%- if cookiecutter.use_docker == "y" or cookiecutter.windows == "n" %}
hiredis==2.1.1 # https://github.com/redis/hiredis-py hiredis==2.1.1 # https://github.com/redis/hiredis-py
{%- endif %} {%- endif %}
@ -36,7 +36,7 @@ django-allauth==0.52.0 # https://github.com/pennersr/django-allauth
django-crispy-forms==1.14.0 # https://github.com/django-crispy-forms/django-crispy-forms django-crispy-forms==1.14.0 # https://github.com/django-crispy-forms/django-crispy-forms
crispy-bootstrap5==0.7 # https://github.com/django-crispy-forms/crispy-bootstrap5 crispy-bootstrap5==0.7 # https://github.com/django-crispy-forms/crispy-bootstrap5
{%- if cookiecutter.frontend_pipeline == 'Django Compressor' %} {%- if cookiecutter.frontend_pipeline == 'Django Compressor' %}
django-compressor==4.3 # https://github.com/django-compressor/django-compressor django-compressor==4.3.1 # https://github.com/django-compressor/django-compressor
{%- endif %} {%- endif %}
django-redis==5.2.0 # https://github.com/jazzband/django-redis django-redis==5.2.0 # https://github.com/jazzband/django-redis
{%- if cookiecutter.use_drf == 'y' %} {%- if cookiecutter.use_drf == 'y' %}

View File

@ -14,7 +14,7 @@ watchfiles==0.18.1 # https://github.com/samuelcolvin/watchfiles
# Testing # Testing
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
mypy==0.982 # https://github.com/python/mypy mypy==0.982 # https://github.com/python/mypy
django-stubs==1.13.1 # https://github.com/typeddjango/django-stubs django-stubs==1.14.0 # https://github.com/typeddjango/django-stubs
pytest==7.2.1 # https://github.com/pytest-dev/pytest pytest==7.2.1 # https://github.com/pytest-dev/pytest
pytest-sugar==0.9.6 # https://github.com/Frozenball/pytest-sugar pytest-sugar==0.9.6 # https://github.com/Frozenball/pytest-sugar
{%- if cookiecutter.use_drf == "y" %} {%- if cookiecutter.use_drf == "y" %}
@ -30,13 +30,13 @@ sphinx-autobuild==2021.3.14 # https://github.com/GaretJax/sphinx-autobuild
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
flake8==6.0.0 # https://github.com/PyCQA/flake8 flake8==6.0.0 # https://github.com/PyCQA/flake8
flake8-isort==6.0.0 # https://github.com/gforcada/flake8-isort flake8-isort==6.0.0 # https://github.com/gforcada/flake8-isort
coverage==7.0.4 # https://github.com/nedbat/coveragepy coverage==7.1.0 # https://github.com/nedbat/coveragepy
black==22.12.0 # https://github.com/psf/black black==22.12.0 # https://github.com/psf/black
pylint-django==2.5.3 # https://github.com/PyCQA/pylint-django pylint-django==2.5.3 # https://github.com/PyCQA/pylint-django
{%- if cookiecutter.use_celery == 'y' %} {%- if cookiecutter.use_celery == 'y' %}
pylint-celery==0.3 # https://github.com/PyCQA/pylint-celery pylint-celery==0.3 # https://github.com/PyCQA/pylint-celery
{%- endif %} {%- endif %}
pre-commit==2.21.0 # https://github.com/pre-commit/pre-commit pre-commit==3.0.1 # https://github.com/pre-commit/pre-commit
# Django # Django
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------

View File

@ -8,7 +8,7 @@ psycopg2==2.9.5 # https://github.com/psycopg/psycopg2
Collectfast==2.2.0 # https://github.com/antonagestam/collectfast Collectfast==2.2.0 # https://github.com/antonagestam/collectfast
{%- endif %} {%- endif %}
{%- if cookiecutter.use_sentry == "y" %} {%- if cookiecutter.use_sentry == "y" %}
sentry-sdk==1.13.0 # https://github.com/getsentry/sentry-python sentry-sdk==1.14.0 # https://github.com/getsentry/sentry-python
{%- endif %} {%- endif %}
{%- if cookiecutter.use_docker == "n" and cookiecutter.windows == "y" %} {%- if cookiecutter.use_docker == "n" and cookiecutter.windows == "y" %}
hiredis==2.1.1 # https://github.com/redis/hiredis-py hiredis==2.1.1 # https://github.com/redis/hiredis-py