From dd064f25edfa48770b3cc764cb4ae669bfd58ac1 Mon Sep 17 00:00:00 2001 From: realpython-bot <42617967+realpython-bot@users.noreply.github.com> Date: Sun, 20 Sep 2026 06:05:37 +0000 Subject: [PATCH] Sync create-django-project with the maintenance update of How to Create a Django Project --- create-django-project/pyproject.toml | 2 +- create-django-project/requirements.txt | 6 ++--- create-django-project/setup/setup/asgi.py | 2 +- create-django-project/setup/setup/settings.py | 26 +++++++++++++------ create-django-project/setup/setup/urls.py | 2 +- create-django-project/setup/setup/wsgi.py | 2 +- 6 files changed, 25 insertions(+), 15 deletions(-) diff --git a/create-django-project/pyproject.toml b/create-django-project/pyproject.toml index dd7fef6158..e16e70fd91 100644 --- a/create-django-project/pyproject.toml +++ b/create-django-project/pyproject.toml @@ -3,5 +3,5 @@ name = "django-setup" version = "0.1.0" requires-python = ">=3.12" dependencies = [ - "django>=6.0", + "django>=6.1", ] diff --git a/create-django-project/requirements.txt b/create-django-project/requirements.txt index f375d23a00..f70305da0c 100644 --- a/create-django-project/requirements.txt +++ b/create-django-project/requirements.txt @@ -1,3 +1,3 @@ -asgiref==3.11.0 -django==6.0 -sqlparse==0.5.4 +asgiref==3.12.1 +django==6.1.1 +sqlparse==0.6.0 diff --git a/create-django-project/setup/setup/asgi.py b/create-django-project/setup/setup/asgi.py index 308629a25e..927b5f4ecf 100644 --- a/create-django-project/setup/setup/asgi.py +++ b/create-django-project/setup/setup/asgi.py @@ -4,7 +4,7 @@ It exposes the ASGI callable as a module-level variable named ``application``. For more information on this file, see -https://docs.djangoproject.com/en/6.0/howto/deployment/asgi/ +https://docs.djangoproject.com/en/6.1/howto/deployment/asgi/ """ import os diff --git a/create-django-project/setup/setup/settings.py b/create-django-project/setup/setup/settings.py index 6505f79f9c..47e7d27279 100644 --- a/create-django-project/setup/setup/settings.py +++ b/create-django-project/setup/setup/settings.py @@ -1,13 +1,13 @@ """ Django settings for setup project. -Generated by 'django-admin startproject' using Django 6.0. +Generated by 'django-admin startproject' using Django 6.1.1. For more information on this file, see -https://docs.djangoproject.com/en/6.0/topics/settings/ +https://docs.djangoproject.com/en/6.1/topics/settings/ For the full list of settings and their values, see -https://docs.djangoproject.com/en/6.0/ref/settings/ +https://docs.djangoproject.com/en/6.1/ref/settings/ """ from pathlib import Path @@ -17,7 +17,7 @@ # Quick-start development settings - unsuitable for production -# See https://docs.djangoproject.com/en/6.0/howto/deployment/checklist/ +# See https://docs.djangoproject.com/en/6.1/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = ( @@ -72,7 +72,7 @@ # Database -# https://docs.djangoproject.com/en/6.0/ref/settings/#databases +# https://docs.djangoproject.com/en/6.1/ref/settings/#databases DATABASES = { "default": { @@ -83,7 +83,7 @@ # Password validation -# https://docs.djangoproject.com/en/6.0/ref/settings/#auth-password-validators +# https://docs.djangoproject.com/en/6.1/ref/settings/#auth-password-validators AUTH_PASSWORD_VALIDATORS = [ { @@ -102,7 +102,7 @@ # Internationalization -# https://docs.djangoproject.com/en/6.0/topics/i18n/ +# https://docs.djangoproject.com/en/6.1/topics/i18n/ LANGUAGE_CODE = "en-us" @@ -114,6 +114,16 @@ # Static files (CSS, JavaScript, Images) -# https://docs.djangoproject.com/en/6.0/howto/static-files/ +# https://docs.djangoproject.com/en/6.1/howto/static-files/ STATIC_URL = "static/" + + +# Email +# https://docs.djangoproject.com/en/6.1/topics/email/#topic-email-configuration + +MAILERS = { + "default": { + "BACKEND": "django.core.mail.backends.console.EmailBackend", + }, +} diff --git a/create-django-project/setup/setup/urls.py b/create-django-project/setup/setup/urls.py index 4aa864acb9..33e4f87d37 100644 --- a/create-django-project/setup/setup/urls.py +++ b/create-django-project/setup/setup/urls.py @@ -2,7 +2,7 @@ URL configuration for setup project. The `urlpatterns` list routes URLs to views. For more information please see: - https://docs.djangoproject.com/en/6.0/topics/http/urls/ + https://docs.djangoproject.com/en/6.1/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views diff --git a/create-django-project/setup/setup/wsgi.py b/create-django-project/setup/setup/wsgi.py index 6178a1d8eb..ba45fc0a7c 100644 --- a/create-django-project/setup/setup/wsgi.py +++ b/create-django-project/setup/setup/wsgi.py @@ -4,7 +4,7 @@ It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see -https://docs.djangoproject.com/en/6.0/howto/deployment/wsgi/ +https://docs.djangoproject.com/en/6.1/howto/deployment/wsgi/ """ import os