From 50a5f8840fa564dcefdb1fa5c58f06fcd472ee70 Mon Sep 17 00:00:00 2001 From: Markus Holtermann Date: Fri, 5 Feb 2021 18:41:49 +0100 Subject: Refs #32394 -- Changed STATIC_URL/MEDIA_URL to relative paths in tests and docs where appropriate. --- docs/ref/settings.txt | 4 ++-- docs/ref/views.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'docs/ref') diff --git a/docs/ref/settings.txt b/docs/ref/settings.txt index 09eeb1e52f..3f18af978d 100644 --- a/docs/ref/settings.txt +++ b/docs/ref/settings.txt @@ -3343,7 +3343,7 @@ Default: ``None`` URL to use when referring to static files located in :setting:`STATIC_ROOT`. -Example: ``"/static/"`` or ``"http://static.example.com/"`` +Example: ``"static/"`` or ``"http://static.example.com/"`` If not ``None``, this will be used as the base path for :ref:`asset definitions` (the ``Media`` class) and the @@ -3400,7 +3400,7 @@ tuples, e.g.:: ("downloads", "/opt/webfiles/stats"), ] -For example, assuming you have :setting:`STATIC_URL` set to ``'/static/'``, the +For example, assuming you have :setting:`STATIC_URL` set to ``'static/'``, the :djadmin:`collectstatic` management command would collect the "stats" files in a ``'downloads'`` subdirectory of :setting:`STATIC_ROOT`. diff --git a/docs/ref/views.txt b/docs/ref/views.txt index 6aff0e3877..7ee6cc806f 100644 --- a/docs/ref/views.txt +++ b/docs/ref/views.txt @@ -39,7 +39,7 @@ built-in handling for user-uploaded files, but you can have Django serve your ] Note, the snippet assumes your :setting:`MEDIA_URL` has a value of -``'/media/'``. This will call the :func:`~django.views.static.serve` view, +``'media/'``. This will call the :func:`~django.views.static.serve` view, passing in the path from the URLconf and the (required) ``document_root`` parameter. -- cgit v1.3