瀏覽代碼

Update all documentation URLs to point to stable Django

Thibaud Colas 1 年之前
父節點
當前提交
5ccdfe1a3a

+ 1 - 1
bakerydemo/base/templatetags/navigation_tags.py

@@ -4,7 +4,7 @@ from wagtail.models import Page, Site
 from bakerydemo.base.models import FooterText
 
 register = template.Library()
-# https://docs.djangoproject.com/en/3.2/howto/custom-template-tags/
+# https://docs.djangoproject.com/en/stable/howto/custom-template-tags/
 
 
 @register.simple_tag(takes_context=True)

+ 7 - 7
bakerydemo/settings/base.py

@@ -4,10 +4,10 @@ Django settings for temp project.
 Generated by 'django-admin startproject' using Django 1.10.5.
 
 For more information on this file, see
-https://docs.djangoproject.com/en/3.2/topics/settings/
+https://docs.djangoproject.com/en/stable/topics/settings/
 
 For the full list of settings and their values, see
-https://docs.djangoproject.com/en/3.2/ref/settings/
+https://docs.djangoproject.com/en/stable/ref/settings/
 """
 
 import os
@@ -19,7 +19,7 @@ PROJECT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
 BASE_DIR = os.path.dirname(PROJECT_DIR)
 
 # Quick-start development settings - unsuitable for production
-# See https://docs.djangoproject.com/en/3.2/howto/deployment/checklist/
+# See https://docs.djangoproject.com/en/stable/howto/deployment/checklist/
 
 # SECURITY WARNING: keep the secret key used in production secret!
 SECRET_KEY = "c6u0-9c!7nilj_ysatsda0(f@e_2mws2f!6m0n^o*4#*q#kzp)"
@@ -118,7 +118,7 @@ WSGI_APPLICATION = "bakerydemo.wsgi.application"
 
 
 # Database
-# https://docs.djangoproject.com/en/3.2/ref/settings/#databases
+# https://docs.djangoproject.com/en/stable/ref/settings/#databases
 
 if "DATABASE_URL" in os.environ:
     DATABASES = {"default": dj_database_url.config(conn_max_age=500)}
@@ -132,7 +132,7 @@ else:
 
 
 # Password validation
-# https://docs.djangoproject.com/en/3.2/ref/settings/#auth-password-validators
+# https://docs.djangoproject.com/en/stable/ref/settings/#auth-password-validators
 
 AUTH_PASSWORD_VALIDATORS = [
     {
@@ -151,7 +151,7 @@ AUTH_PASSWORD_VALIDATORS = [
 
 
 # Internationalization
-# https://docs.djangoproject.com/en/3.2/topics/i18n/
+# https://docs.djangoproject.com/en/stable/topics/i18n/
 
 LANGUAGE_CODE = "en-us"
 
@@ -165,7 +165,7 @@ USE_TZ = True
 
 
 # Static files (CSS, JavaScript, Images)
-# https://docs.djangoproject.com/en/3.2/howto/static-files/
+# https://docs.djangoproject.com/en/stable/howto/static-files/
 
 STATICFILES_FINDERS = [
     "django.contrib.staticfiles.finders.FileSystemFinder",

+ 4 - 4
bakerydemo/settings/production.py

@@ -24,7 +24,7 @@ SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https")
 
 # Accept all hostnames, since we don't know in advance which hostname will be used for any given Heroku instance.
 # IMPORTANT: Set this to a real hostname when using this in production!
-# See https://docs.djangoproject.com/en/3.2/ref/settings/#allowed-hosts
+# See https://docs.djangoproject.com/en/stable/ref/settings/#allowed-hosts
 ALLOWED_HOSTS = os.getenv("DJANGO_ALLOWED_HOSTS", "*").split(",")
 
 EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend"
@@ -188,7 +188,7 @@ LOGGING = {
 # These settings are usually used only on the production sites.
 # This is a configuration of the CDN/front-end cache that is used to cache the
 # production websites.
-# https://docs.wagtail.org/en/latest/reference/contrib/frontendcache.html
+# https://docs.wagtail.org/en/stable/reference/contrib/frontendcache.html
 # The backend can be configured to use an account-wide API key, or an API token with
 # restricted access.
 if (
@@ -273,7 +273,7 @@ SECURE_HSTS_SECONDS = int(
 # because the apps are running on client domains (or our own for staging), that are
 # being used for other applications as well. We should therefore not impose any
 # restrictions on these unrelated applications.
-# https://docs.djangoproject.com/en/3.2/ref/settings/#secure-hsts-include-subdomains
+# https://docs.djangoproject.com/en/stable/ref/settings/#secure-hsts-include-subdomains
 SECURE_HSTS_INCLUDE_SUBDOMAINS = False
 
 # https://docs.djangoproject.com/en/stable/ref/settings/#secure-browser-xss-filter
@@ -290,5 +290,5 @@ REFERRER_POLICY = os.environ.get(  # noqa
 ).strip()
 
 # Allow the redirect importer to work in load-balanced / cloud environments.
-# https://docs.wagtail.io/en/v2.13/reference/settings.html#redirects
+# https://docs.wagtail.org/en/stable/reference/settings.html#redirects
 WAGTAIL_REDIRECTS_FILE_STORAGE = "cache"

+ 1 - 1
bakerydemo/templates/base/form_page.html

@@ -24,7 +24,7 @@
             <div class="col-md-8 form-page">
                 {% comment %}
         You could render your form using a Django rendering shortcut such as `{{ form.as_p }}` but that will tend towards unsemantic code, and make it difficult to style. You can read more on Django form at:
-        https://docs.djangoproject.com/en/3.2/topics/forms/#form-rendering-options
+        https://docs.djangoproject.com/en/stable/topics/forms/#working-with-form-templates
         {% endcomment %}
                 <form action="{% pageurl page %}" method="POST">
                     {% csrf_token %}

+ 1 - 1
bakerydemo/wsgi.py

@@ -4,7 +4,7 @@ WSGI config for portal project.
 It exposes the WSGI callable as a module-level variable named ``application``.
 
 For more information on this file, see
-https://docs.djangoproject.com/en/3.2/howto/deployment/wsgi/
+https://docs.djangoproject.com/en/stable/howto/deployment/wsgi/
 """
 
 import os

+ 2 - 2
readme.md

@@ -121,7 +121,7 @@ docker compose logs -f
 
 ## Setup with Virtualenv
 
-You can run the Wagtail demo locally without setting up Vagrant or Docker and simply use Virtualenv, which is the [recommended installation approach](https://docs.djangoproject.com/en/5.1/topics/install/#install-the-django-code) for Django itself.
+You can run the Wagtail demo locally without setting up Vagrant or Docker and simply use Virtualenv, which is the [recommended installation approach](https://docs.djangoproject.com/en/stable/topics/install/#install-the-django-code) for Django itself.
 
 #### Dependencies
 
@@ -217,7 +217,7 @@ In production on your own site, you'll need to change this to:
 
 `EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'`
 
-and configure [SMTP settings](https://docs.djangoproject.com/en/3.2/topics/email/#smtp-backend) appropriate for your email provider.
+and configure [SMTP settings](https://docs.djangoproject.com/en/stable/topics/email/#smtp-backend) appropriate for your email provider.
 
 ### Testing Content-Security-Policy compliance in Wagtail