Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from cookiecutter:master #700

Merged
merged 31 commits into from
Feb 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
4da8386
Release 2024.01.24
actions-user Jan 25, 2024
bda89ea
Replace custom static & media storage classes by passing options in t…
jkaeske Jan 25, 2024
9564698
Update Contributors
browniebroke Jan 25, 2024
c7eded8
Add registry to Docker images names (#4804)
timfreund Jan 25, 2024
991a109
Update python-slugify from 8.0.1 to 8.0.2
pyup-bot Jan 25, 2024
cf788ff
Release 2024.01.25
actions-user Jan 26, 2024
6301fcc
Update black to 24.1.0 (#4806)
pyup-bot Jan 26, 2024
8324c16
Release 2024.01.26
actions-user Jan 27, 2024
e4d6b98
Do not show webpack devserver overlay for warnings
foarsitter Jan 27, 2024
b68913c
Update coverage from 7.4.0 to 7.4.1 (#4807)
pyup-bot Jan 27, 2024
05c0d3e
Merge pull request #4805 from cookiecutter/pyup-update-python-slugify…
foarsitter Jan 27, 2024
544e1e1
Merge pull request #4809 from foarsitter/webpack_disable_devserver_ov…
foarsitter Jan 27, 2024
e840b75
Release 2024.01.27
actions-user Jan 28, 2024
2ef8d0a
Update black from 24.1.0 to 24.1.1
pyup-bot Jan 28, 2024
d45c042
Update black from 24.1.0 to 24.1.1
pyup-bot Jan 28, 2024
e87b6fa
'webpack_loader.loader' module has been renamed to 'webpack_loader.lo…
foarsitter Jan 28, 2024
4f02e39
Auto-update pre-commit hooks
browniebroke Jan 29, 2024
9675603
Merge pull request #4817 from cookiecutter/update/pre-commit-autoupdate
foarsitter Jan 29, 2024
9227319
Merge pull request #4814 from cookiecutter/pyup-update-black-24.1.0-t…
foarsitter Jan 29, 2024
5083f86
Merge pull request #4815 from foarsitter/webpack_deprecated_loader
foarsitter Jan 29, 2024
cce9c0e
Update mention of coverage config file to `pyproject.toml` in documen…
henningbra Jan 29, 2024
a11f02d
Update Contributors
browniebroke Jan 29, 2024
5d9efa6
Release 2024.01.29
actions-user Jan 30, 2024
db3b1d5
Update pygithub to 2.2.0 (#4821)
pyup-bot Jan 30, 2024
5d8a538
Update uvicorn to 0.27.0.post1 (#4818)
pyup-bot Jan 30, 2024
299a2dc
Update sentry-sdk to 1.40.0 (#4822)
pyup-bot Jan 30, 2024
7d75873
Update pytest-django to 4.8.0 (#4823)
pyup-bot Jan 30, 2024
f3cf855
Release 2024.01.30
actions-user Jan 31, 2024
b556cef
Bump tiangolo/issue-manager from 0.4.1 to 0.5.0 (#4825)
dependabot[bot] Jan 31, 2024
9ea2365
Update python-slugify to 8.0.3 (#4826)
pyup-bot Jan 31, 2024
102a94f
Release 2024.01.31
actions-user Feb 1, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/contributors.json
Original file line number Diff line number Diff line change
Expand Up @@ -1508,5 +1508,15 @@
"name": "Nix Siow",
"github_login": "nixsiow",
"twitter_username": "nixsiow"
},
{
"name": "Jens Kaeske",
"github_login": "jkaeske",
"twitter_username": ""
},
{
"name": "henningbra",
"github_login": "henningbra",
"twitter_username": ""
}
]
2 changes: 1 addition & 1 deletion .github/workflows/issue-manager.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:

runs-on: ubuntu-latest
steps:
- uses: tiangolo/issue-manager@0.4.1
- uses: tiangolo/issue-manager@0.5.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
config: >
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ repos:
exclude: hooks/

- repo: https://github.com/psf/black
rev: 23.12.1
rev: 24.1.1
hooks:
- id: black

Expand Down
75 changes: 75 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,81 @@ All enhancements and patches to Cookiecutter Django will be documented in this f

<!-- GENERATOR_PLACEHOLDER -->

## 2024.01.31


### Updated

- Update python-slugify to 8.0.3 ([#4826](https://github.com/cookiecutter/cookiecutter-django/pull/4826))

## 2024.01.30


### Updated

- Update pytest-django to 4.8.0 ([#4823](https://github.com/cookiecutter/cookiecutter-django/pull/4823))

- Update sentry-sdk to 1.40.0 ([#4822](https://github.com/cookiecutter/cookiecutter-django/pull/4822))

- Update uvicorn to 0.27.0.post1 ([#4818](https://github.com/cookiecutter/cookiecutter-django/pull/4818))

## 2024.01.29


### Changed

- Fix deprecation warning about renaming of `webpack_loader.loader` to `webpack_loader.loaders` ([#4815](https://github.com/cookiecutter/cookiecutter-django/pull/4815))

### Documentation

- Update mention of coverage config file to `pyproject.toml` in documentation ([#4816](https://github.com/cookiecutter/cookiecutter-django/pull/4816))

### Updated

- Update black to 24.1.1 ([#4814](https://github.com/cookiecutter/cookiecutter-django/pull/4814))

- Auto-update pre-commit hooks ([#4817](https://github.com/cookiecutter/cookiecutter-django/pull/4817))

## 2024.01.27


### Changed

- Do not show webpack devserver overlay for warnings ([#4809](https://github.com/cookiecutter/cookiecutter-django/pull/4809))

### Updated

- Update python-slugify to 8.0.2 ([#4805](https://github.com/cookiecutter/cookiecutter-django/pull/4805))

- Update coverage to 7.4.1 ([#4807](https://github.com/cookiecutter/cookiecutter-django/pull/4807))

## 2024.01.26


### Updated

- Update black to 24.1.0 ([#4806](https://github.com/cookiecutter/cookiecutter-django/pull/4806))

## 2024.01.25


### Changed

- Replace custom static &amp; media storage classes by passing options in the `STORAGES` setting ([#4803](https://github.com/cookiecutter/cookiecutter-django/pull/4803))

- Add registry to Docker images names ([#4804](https://github.com/cookiecutter/cookiecutter-django/pull/4804))

## 2024.01.24


### Changed

- Migrate to the unified `STORAGES` setting added in Django 4.2 ([#4477](https://github.com/cookiecutter/cookiecutter-django/pull/4477))

### Updated

- Update uvicorn to 0.27.0 ([#4800](https://github.com/cookiecutter/cookiecutter-django/pull/4800))

## 2024.01.21


Expand Down
14 changes: 14 additions & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -964,6 +964,13 @@ Listed in alphabetical order.
</td>
<td></td>
</tr>
<tr>
<td>henningbra</td>
<td>
<a href="https://github.com/henningbra">henningbra</a>
</td>
<td></td>
</tr>
<tr>
<td>Henrique G. G. Pereira</td>
<td>
Expand Down Expand Up @@ -1076,6 +1083,13 @@ Listed in alphabetical order.
</td>
<td></td>
</tr>
<tr>
<td>Jens Kaeske</td>
<td>
<a href="https://github.com/jkaeske">jkaeske</a>
</td>
<td></td>
</tr>
<tr>
<td>Jens Nilsson</td>
<td>
Expand Down
2 changes: 1 addition & 1 deletion docs/testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ If you're running the project locally with Docker, use these commands instead: :

At the root of the project folder, you will find the `pytest.ini` file. You can use this to customize_ the ``pytest`` to your liking.

There is also the `.coveragerc`. This is the configuration file for the ``coverage`` tool. You can find out more about `configuring`_ ``coverage``.
The configuration for ``coverage`` can be found in ``pyproject.toml``. You can find out more about `configuring`_ ``coverage``.

.. seealso::

Expand Down
6 changes: 1 addition & 5 deletions hooks/post_gen_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
TODO: restrict Cookiecutter Django project initialization to
Python 3.x environments only
"""

from __future__ import print_function

import json
Expand Down Expand Up @@ -429,10 +430,6 @@ def remove_drf_starter_files():
os.remove(os.path.join("{{cookiecutter.project_slug}}", "users", "tests", "test_swagger.py"))


def remove_storages_module():
os.remove(os.path.join("{{cookiecutter.project_slug}}", "utils", "storages.py"))


def main():
debug = "{{ cookiecutter.debug }}".lower() == "y"

Expand Down Expand Up @@ -499,7 +496,6 @@ def main():
WARNING + "You chose to not use any cloud providers nor Docker, "
"media files won't be served in production." + TERMINATOR
)
remove_storages_module()

if "{{ cookiecutter.use_celery }}".lower() == "n":
remove_celery_files()
Expand Down
1 change: 1 addition & 0 deletions hooks/pre_gen_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
TODO: restrict Cookiecutter Django project initialization
to Python 3.x environments only
"""

from __future__ import print_function

import sys
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ binaryornot==0.4.4

# Code quality
# ------------------------------------------------------------------------------
black==23.12.1
black==24.1.1
isort==5.13.2
flake8==7.0.0
django-upgrade==1.15.0
Expand All @@ -22,7 +22,7 @@ pyyaml==6.0.1

# Scripting
# ------------------------------------------------------------------------------
PyGithub==2.1.1
PyGithub==2.2.0
gitpython==3.1.41
jinja2==3.1.3
requests==2.31.0
1 change: 1 addition & 0 deletions scripts/create_django_issue.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
This script handles when there are multiple Django versions that need
to keep up to date.
"""

from __future__ import annotations

import os
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from distutils.core import setup

# We use calendar versioning
version = "2024.01.21"
version = "2024.01.31"

with open("README.md") as readme_file:
long_description = readme_file.read()
Expand Down
1 change: 1 addition & 0 deletions tests/test_hooks.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Unit tests for the hooks"""

import os
from pathlib import Path

Expand Down
2 changes: 1 addition & 1 deletion {{cookiecutter.project_slug}}/.pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ repos:
args: [--py311-plus]

- repo: https://github.com/psf/black
rev: 23.12.1
rev: 24.1.1
hooks:
- id: black

Expand Down
6 changes: 3 additions & 3 deletions {{cookiecutter.project_slug}}/compose/local/django/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# define an alias for the specific python version used in this file.
FROM python:3.11.7-slim-bookworm as python
FROM docker.io/python:3.11.7-slim-bookworm as python

# Python build stage
FROM python as python-build-stage
FROM docker.io/python as python-build-stage

ARG BUILD_ENVIRONMENT=local

Expand All @@ -22,7 +22,7 @@ RUN pip wheel --wheel-dir /usr/src/app/wheels \


# Python 'run' stage
FROM python as python-run-stage
FROM docker.io/python as python-run-stage

ARG BUILD_ENVIRONMENT=local
ARG APP_HOME=/app
Expand Down
6 changes: 3 additions & 3 deletions {{cookiecutter.project_slug}}/compose/local/docs/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# define an alias for the specific python version used in this file.
FROM python:3.11.7-slim-bookworm as python
FROM docker.io/python:3.11.7-slim-bookworm as python


# Python build stage
FROM python as python-build-stage
FROM docker.io/python as python-build-stage

ENV PYTHONDONTWRITEBYTECODE 1

Expand All @@ -26,7 +26,7 @@ RUN pip wheel --no-cache-dir --wheel-dir /usr/src/app/wheels \


# Python 'run' stage
FROM python as python-run-stage
FROM docker.io/python as python-run-stage

ARG BUILD_ENVIRONMENT
ENV PYTHONUNBUFFERED 1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:20-bookworm-slim
FROM docker.io/node:20-bookworm-slim

WORKDIR /app

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM garland/aws-cli-docker:1.16.140
FROM docker.io/garland/aws-cli-docker:1.16.140

COPY ./compose/production/aws/maintenance /usr/local/bin/maintenance
COPY ./compose/production/postgres/maintenance/_sourced /usr/local/bin/maintenance/_sourced
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% if cookiecutter.frontend_pipeline in ['Gulp', 'Webpack'] -%}
FROM node:20-bookworm-slim as client-builder
FROM docker.io/node:20-bookworm-slim as client-builder

ARG APP_HOME=/app
WORKDIR ${APP_HOME}
Expand All @@ -25,10 +25,10 @@ RUN npm run build

{%- endif %}
# define an alias for the specific python version used in this file.
FROM python:3.11.7-slim-bookworm as python
FROM docker.io/python:3.11.7-slim-bookworm as python

# Python build stage
FROM python as python-build-stage
FROM docker.io/python as python-build-stage

ARG BUILD_ENVIRONMENT=production

Expand All @@ -48,7 +48,7 @@ RUN pip wheel --wheel-dir /usr/src/app/wheels \


# Python 'run' stage
FROM python as python-run-stage
FROM docker.io/python as python-run-stage

ARG BUILD_ENVIRONMENT=production
ARG APP_HOME=/app
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
FROM nginx:1.17.8-alpine
FROM docker.io/nginx:1.17.8-alpine
COPY ./compose/production/nginx/default.conf /etc/nginx/conf.d/default.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM postgres:{{ cookiecutter.postgresql_version }}
FROM docker.io/postgres:{{ cookiecutter.postgresql_version }}

COPY ./compose/production/postgres/maintenance /usr/local/bin/maintenance
RUN chmod +x /usr/local/bin/maintenance/*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM traefik:2.10.7
FROM docker.io/traefik:2.10.7
RUN mkdir -p /etc/traefik/acme \
&& touch /etc/traefik/acme/acme.json \
&& chmod 600 /etc/traefik/acme/acme.json
Expand Down
1 change: 1 addition & 0 deletions {{cookiecutter.project_slug}}/config/asgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
https://docs.djangoproject.com/en/dev/howto/deployment/asgi/

"""

import os
import sys
from pathlib import Path
Expand Down
5 changes: 2 additions & 3 deletions {{cookiecutter.project_slug}}/config/settings/base.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"""
Base settings to build other settings files upon.
"""
"""Base settings to build other settings files upon."""

from pathlib import Path

import environ
Expand Down
Loading