From bd8cf64dedadc97a4853823ed228e2faf16b642e Mon Sep 17 00:00:00 2001 From: mr1716 Date: Thu, 5 Jun 2025 11:38:07 -0400 Subject: [PATCH] #19638 Update Django URLs To Stable Version (#19649) * Update Django URLs To Stable Version * Update docs/configuration/security.md --------- Co-authored-by: Jeremy Stretch --- docs/configuration/security.md | 2 +- docs/installation/3-netbox.md | 2 +- docs/installation/4b-uwsgi.md | 2 +- docs/plugins/development/migration-v4.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/configuration/security.md b/docs/configuration/security.md index 1cd36729b..775490b70 100644 --- a/docs/configuration/security.md +++ b/docs/configuration/security.md @@ -92,7 +92,7 @@ If `True`, the cookie employed for cross-site request forgery (CSRF) protection Default: `[]` -Defines a list of trusted origins for unsafe (e.g. `POST`) requests. This is a pass-through to Django's [`CSRF_TRUSTED_ORIGINS`](https://docs.djangoproject.com/en/4.0/ref/settings/#std:setting-CSRF_TRUSTED_ORIGINS) setting. Note that each host listed must specify a scheme (e.g. `http://` or `https://). +Defines a list of trusted origins for unsafe (e.g. `POST`) requests. This is a pass-through to Django's [`CSRF_TRUSTED_ORIGINS`](https://docs.djangoproject.com/en/stable/ref/settings/#csrf-trusted-origins) setting. Note that each host listed must specify a scheme (e.g. `http://` or `https://). ```python CSRF_TRUSTED_ORIGINS = ( diff --git a/docs/installation/3-netbox.md b/docs/installation/3-netbox.md index 67a19e2e3..60a118977 100644 --- a/docs/installation/3-netbox.md +++ b/docs/installation/3-netbox.md @@ -108,7 +108,7 @@ Open `configuration.py` with your preferred editor to begin configuring NetBox. ### ALLOWED_HOSTS -This is a list of the valid hostnames and IP addresses by which this server can be reached. You must specify at least one name or IP address. (Note that this does not restrict the locations from which NetBox may be accessed: It is merely for [HTTP host header validation](https://docs.djangoproject.com/en/3.0/topics/security/#host-headers-virtual-hosting).) +This is a list of the valid hostnames and IP addresses by which this server can be reached. You must specify at least one name or IP address. (Note that this does not restrict the locations from which NetBox may be accessed: It is merely for [HTTP host header validation](https://docs.djangoproject.com/en/stable/topics/security/#host-headers-virtual-hosting).) ```python ALLOWED_HOSTS = ['netbox.example.com', '192.0.2.123'] diff --git a/docs/installation/4b-uwsgi.md b/docs/installation/4b-uwsgi.md index c8d1437a0..783ef9f06 100644 --- a/docs/installation/4b-uwsgi.md +++ b/docs/installation/4b-uwsgi.md @@ -28,7 +28,7 @@ NetBox ships with a default configuration file for uWSGI. To use it, copy `/opt/ sudo cp /opt/netbox/contrib/uwsgi.ini /opt/netbox/uwsgi.ini ``` -While the provided configuration should suffice for most initial installations, you may wish to edit this file to change the bound IP address and/or port number, or to make performance-related adjustments. See [the uWSGI documentation](https://uwsgi-docs-additions.readthedocs.io/en/latest/Options.html) for the available configuration parameters and take a minute to review the [Things to know](https://uwsgi-docs.readthedocs.io/en/latest/ThingsToKnow.html) page. Django also provides [additional documentation](https://docs.djangoproject.com/en/5.0/howto/deployment/wsgi/uwsgi/) on configuring uWSGI with a Django app. +While the provided configuration should suffice for most initial installations, you may wish to edit this file to change the bound IP address and/or port number, or to make performance-related adjustments. See [the uWSGI documentation](https://uwsgi-docs-additions.readthedocs.io/en/latest/Options.html) for the available configuration parameters and take a minute to review the [Things to know](https://uwsgi-docs.readthedocs.io/en/latest/ThingsToKnow.html) page. Django also provides [additional documentation](https://docs.djangoproject.com/en/stable/howto/deployment/wsgi/uwsgi/) on configuring uWSGI with a Django app. ## systemd Setup diff --git a/docs/plugins/development/migration-v4.md b/docs/plugins/development/migration-v4.md index 9622fab30..bf7e720ac 100644 --- a/docs/plugins/development/migration-v4.md +++ b/docs/plugins/development/migration-v4.md @@ -22,7 +22,7 @@ from netbox.plugins import PluginConfig ### ContentType renamed to ObjectType -NetBox's proxy model for Django's [ContentType model](https://docs.djangoproject.com/en/5.0/ref/contrib/contenttypes/#the-contenttype-model) has been renamed to ObjectType for clarity. In general, plugins should use the ObjectType proxy when referencing content types, as it includes several custom manager methods. The one exception to this is when defining [generic foreign keys](https://docs.djangoproject.com/en/5.0/ref/contrib/contenttypes/#generic-relations): The ForeignKey field used for a GFK should point to Django's native ContentType. +NetBox's proxy model for Django's [ContentType model](https://docs.djangoproject.com/en/stable/ref/contrib/contenttypes/#the-contenttype-model) has been renamed to ObjectType for clarity. In general, plugins should use the ObjectType proxy when referencing content types, as it includes several custom manager methods. The one exception to this is when defining [generic foreign keys](https://docs.djangoproject.com/en/stable/ref/contrib/contenttypes/#generic-relations): The ForeignKey field used for a GFK should point to Django's native ContentType. Additionally, plugin maintainers are strongly encouraged to adopt the "object type" terminology for field and filter names wherever feasible to be consistent with NetBox core (however this is not required for compatibility).