#!/usr/bin/env python
try:
    from setuptools import setup
except ImportError:
    from distutils.core import setup

# We use calendar versioning
version = "2023.04.03"

with open("README.rst") as readme_file:
    long_description = readme_file.read()

setup(
    name="cookiecutter-django",
    version=version,
    description=(
        "A Cookiecutter template for creating production-ready "
        "Django projects quickly."
    ),
    long_description=long_description,
    author="Daniel Roy Greenfeld",
    author_email="pydanny@gmail.com",
    url="https://github.com/cookiecutter/cookiecutter-django",
    packages=[],
    license="BSD",
    zip_safe=False,
    classifiers=[
        "Development Status :: 4 - Beta",
        "Environment :: Console",
        "Framework :: Django :: 4.0",
        "Intended Audience :: Developers",
        "Natural Language :: English",
        "License :: OSI Approved :: BSD License",
        "Programming Language :: Python",
        "Programming Language :: Python :: 3",
        "Programming Language :: Python :: 3.10",
        "Programming Language :: Python :: Implementation :: CPython",
        "Topic :: Software Development",
    ],
    keywords=(
        "cookiecutter, Python, projects, project templates, django, "
        "skeleton, scaffolding, project directory, setup.py"
    ),
)

setup.py
#!/usr/bin/env python
try:
    from setuptools import setup
except ImportError:
    from distutils.core import setup

# We use calendar versioning
version = "2023.04.03"

with open("README.rst") as readme_file:
    long_description = readme_file.read()

setup(
    name="cookiecutter-django",
    version=version,
    description=(
        "A Cookiecutter template for creating production-ready "
        "Django projects quickly."
    ),
    long_description=long_description,
    author="Daniel Roy Greenfeld",
    author_email="pydanny@gmail.com",
    url="https://github.com/cookiecutter/cookiecutter-django",
    packages=[],
    license="BSD",
    zip_safe=False,
    classifiers=[
        "Development Status :: 4 - Beta",
        "Environment :: Console",
        "Framework :: Django :: 4.1",
        "Intended Audience :: Developers",
        "Natural Language :: English",
        "License :: OSI Approved :: BSD License",
        "Programming Language :: Python",
        "Programming Language :: Python :: 3",
        "Programming Language :: Python :: 3.10",
        "Programming Language :: Python :: Implementation :: CPython",
        "Topic :: Software Development",
    ],
    keywords=(
        "cookiecutter, Python, projects, project templates, django, "
        "skeleton, scaffolding, project directory, setup.py"
    ),
)

setup.py
diff --git a/README.md b/README.md
index aaeb25828b..d951c7a217 100644
--- a/README.md
+++ b/README.md
@@ -19,7 +19,7 @@ production-ready Django projects quickly.
 
 ## Features
 
--   For Django 4.0
+-   For Django 4.1
 -   Works with Python 3.10
 -   Renders Django projects with 100% starting test coverage
 -   Twitter [Bootstrap](https://github.com/twbs/bootstrap) v5
diff --git a/setup.py b/setup.py
index 334bd2906c..8155fd234f 100644
--- a/setup.py
+++ b/setup.py
@@ -27,7 +27,7 @@
     classifiers=[
         "Development Status :: 4 - Beta",
         "Environment :: Console",
-        "Framework :: Django :: 4.0",
+        "Framework :: Django :: 4.1",
         "Intended Audience :: Developers",
         "Natural Language :: English",
         "License :: OSI Approved :: BSD License",
diff --git a/{{cookiecutter.project_slug}}/requirements/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt
index fb3559194c..6cce06457c 100644
--- a/{{cookiecutter.project_slug}}/requirements/base.txt
+++ b/{{cookiecutter.project_slug}}/requirements/base.txt
@@ -29,7 +29,7 @@ uvicorn[standard]==0.21.1  # https://github.com/encode/uvicorn
 
 # Django
 # ------------------------------------------------------------------------------
-django==4.0.10  # pyup: < 4.1  # https://www.djangoproject.com/
+django==4.1.7  # pyup: < 4.2  # https://www.djangoproject.com/
 django-environ==0.10.0  # https://github.com/joke2k/django-environ
 django-model-utils==4.3.1  # https://github.com/jazzband/django-model-utils
 django-allauth==0.54.0  # https://github.com/pennersr/django-allauth

Docker Django 4.1 template reload behavior
Using Django 4.1 under Docker gives trouble in development with the changed default behavior of the template loading. Templates are cached until restart since the cached loader is added as default: https://docs.djangoproject.com/en/4.1/releases/4.1/#templates

My current workaround is adding the next snippet to local.py

```
TEMPLATES[0]["OPTIONS"]["loaders"] = [
    (
        "django.template.loaders.filesystem.Loader",
        [APPS_DIR / "templates"],
    ),
    "django.template.loaders.app_directories.Loader",
]
```
[Update Django] Django 4.1
4.1 requirements tables



## base.txt

| Name | Version in Master | 4.1 Compatible Version | OK |
| ---- | :---------------: | :-----------------------------: | :-: |
| [pytz](http://pythonhosted.org/pytz) | 2023.3 | n/a | ✅ |
| [python-slugify](https://github.com/un33k/python-slugify) | 8.0.1 | n/a | ✅ |
| [Pillow](https://python-pillow.org) | 9.5.0 | n/a | ✅ |
| [rcssmin](http://opensource.perlig.de/rcssmin/) | 1.1.1 | n/a | ✅ |
| [argon2-cffi](https://pypi.org/project/argon2-cffi/) | 21.3.0 | n/a | ✅ |
| [whitenoise](https://github.com/evansd/whitenoise) | 6.4.0 | 6.2.0 | ✅ |
| [redis](https://github.com/redis/redis-py) | 4.5.4 | n/a | ✅ |
| [hiredis](https://github.com/redis/hiredis-py) | 2.2.2 | n/a | ✅ |
| [celery](http://celeryproject.org) | 5.2.7 | n/a | ✅ |
| [django-celery-beat](https://github.com/celery/django-celery-beat) | 2.5.0 | 2.4.0 | ✅ |
| [flower](https://github.com/mher/flower) | 1.2.0 | n/a | ✅ |
| [uvicorn](https://pypi.org/project/uvicorn/) | 0.21.1 | n/a | ✅ |
| [django](https://www.djangoproject.com/) | 4.0.10 | 2.4.0 | ✅ |
| [django-environ](https://django-environ.readthedocs.org) | 0.10.0 |  | ❓ |
| [django-model-utils](https://github.com/jazzband/django-model-utils) | 4.3.1 | 4.3.1 | ✅ |
| [django-allauth](http://www.intenct.nl/projects/django-allauth/) | 0.54.0 | 0.52.0 | ✅ |
| [django-crispy-forms](https://pypi.org/project/django-crispy-forms/) | 2.0 | 2.0 | ✅ |
| [crispy-bootstrap5](https://github.com/django-crispy-forms/crispy-bootstrap5) | 0.7 | 0.7 | ✅ |
| [django-compressor](https://django-compressor.readthedocs.io/en/latest/) | 4.3.1 | 4.1 | ✅ |
| [django-redis](https://github.com/jazzband/django-redis) | 5.2.0 |  | ❌ |
| [djangorestframework](https://www.django-rest-framework.org/) | 3.14.0 | 3.14.0 | ✅ |
| [django-cors-headers](https://github.com/adamchainz/django-cors-headers) | 3.14.0 | 3.13.0 | ✅ |
| [drf-spectacular](https://github.com/tfranzel/drf-spectacular) | 0.26.1 | 0.24.0 | ✅ |
| [django-webpack-loader](https://github.com/django-webpack/django-webpack-loader) | 1.8.1 | 1.8.0 | ✅ |


## local.txt

| Name | Version in Master | 4.1 Compatible Version | OK |
| ---- | :---------------: | :-----------------------------: | :-: |
| [Werkzeug](https://palletsprojects.com/p/werkzeug/) | 2.2.3 | n/a | ✅ |
| [ipdb](https://github.com/gotcha/ipdb) | 0.13.13 | n/a | ✅ |
| [psycopg2](https://psycopg.org/) | 2.9.6 | n/a | ✅ |
| [psycopg2-binary](https://psycopg.org/) | 2.9.6 | n/a | ✅ |
| [watchfiles](https://github.com/samuelcolvin/watchfiles/watchfiles) | 0.19.0 | n/a | ✅ |
| [mypy](http://www.mypy-lang.org/) | 1.1.1 | n/a | ✅ |
| [django-stubs](https://github.com/typeddjango/django-stubs) | 1.16.0 | 1.13.0 | ✅ |
| [pytest](https://docs.pytest.org/en/latest/) | 7.2.2 | n/a | ✅ |
| [pytest-sugar](https://pivotfinland.com/pytest-sugar/) | 0.9.6 | n/a | ✅ |
| [djangorestframework-stubs](https://github.com/typeddjango/djangorestframework-stubs) | 1.10.0 | n/a | ✅ |
| [sphinx](https://pypi.org/project/Sphinx/) | 6.1.3 | n/a | ✅ |
| [sphinx-autobuild](https://github.com/executablebooks/sphinx-autobuild) | 2021.3.14 | n/a | ✅ |
| [flake8](https://github.com/pycqa/flake8) | 6.0.0 | n/a | ✅ |
| [flake8-isort](https://github.com/gforcada/flake8-isort) | 6.0.0 | n/a | ✅ |
| [coverage](https://github.com/nedbat/coveragepy) | 7.2.2 | n/a | ✅ |
| [black](https://pypi.org/project/black/) | 23.3.0 | n/a | ✅ |
| [pylint-django](https://github.com/PyCQA/pylint-django) | 2.5.3 |  | ❌ |
| [pylint-celery](https://github.com/landscapeio/pylint-celery) | 0.3 | n/a | ✅ |
| [pre-commit](https://github.com/pre-commit/pre-commit) | 3.2.1 | n/a | ✅ |
| [factory-boy](https://github.com/FactoryBoy/factory_boy) | 3.2.1 |  | ❌ |
| [django-debug-toolbar](https://pypi.org/project/django-debug-toolbar/) | 3.8.1 | 3.6.0 | ✅ |
| [django-extensions](http://github.com/django-extensions/django-extensions) | 3.2.1 | 3.2.1 | ✅ |
| [django-coverage-plugin](https://github.com/nedbat/django_coverage_plugin) | 3.0.0 | 2.0.4 | ✅ |
| [pytest-django](https://pytest-django.readthedocs.io/) | 4.5.2 |  | ❌ |


## production.txt

| Name | Version in Master | 4.1 Compatible Version | OK |
| ---- | :---------------: | :-----------------------------: | :-: |
| [gunicorn](https://gunicorn.org) | 20.1.0 | n/a | ✅ |
| [psycopg2](https://psycopg.org/) | 2.9.6 | n/a | ✅ |
| [Collectfast](https://github.com/antonagestam/collectfast/) | 2.2.0 | n/a | ✅ |
| [sentry-sdk](https://github.com/getsentry/sentry-python) | 1.17.0 | n/a | ✅ |
| [hiredis](https://github.com/redis/hiredis-py) | 2.2.2 | n/a | ✅ |
| [django-storages](https://github.com/jschneier/django-storages) | 1.13.2 | 1.13 | ✅ |
| [django-anymail](https://github.com/anymail/django-anymail) | 9.1 | 9.0 | ✅ |

