Refs #33842 -- Removed incorrect :file: role in contrib docs.

The file role is not appropriate for URLs and URL path-components.
This commit is contained in:
Ramil Yanbulatov 2022-08-09 14:50:05 +02:00 committed by Carlton Gibson
parent d699594462
commit cccfb45d00
2 changed files with 6 additions and 6 deletions

View File

@ -156,9 +156,9 @@ Note:
In both cases, "absolute path" means a URL that doesn't include the
protocol or domain. Examples:
* Good: :file:`'/foo/bar/'`
* Bad: :file:`'example.com/foo/bar/'`
* Bad: :file:`'https://example.com/foo/bar/'`
* Good: ``'/foo/bar/'``
* Bad: ``'example.com/foo/bar/'``
* Bad: ``'https://example.com/foo/bar/'``
If :attr:`~Sitemap.location` isn't provided, the framework will call
the ``get_absolute_url()`` method on each object as returned by

View File

@ -210,8 +210,8 @@ items based on information in the feed's URL.
The police beat feeds could be accessible via URLs like this:
* :file:`/beats/613/rss/` -- Returns recent crimes for beat 613.
* :file:`/beats/1424/rss/` -- Returns recent crimes for beat 1424.
* ``/beats/613/rss/`` -- Returns recent crimes for beat 613.
* ``/beats/1424/rss/`` -- Returns recent crimes for beat 1424.
These can be matched with a :doc:`URLconf </topics/http/urls>` line such as::
@ -314,7 +314,7 @@ URLs
----
The ``link`` method/attribute can return either an absolute path (e.g.
:file:`"/blog/"`) or a URL with the fully-qualified domain and protocol (e.g.
``"/blog/"``) or a URL with the fully-qualified domain and protocol (e.g.
``"https://www.example.com/blog/"``). If ``link`` doesn't return the domain,
the syndication framework will insert the domain of the current site, according
to your :setting:`SITE_ID setting <SITE_ID>`.