Used :rfc: role in various docs.

This commit is contained in:
Mariusz Felisiak 2020-04-15 13:11:13 +02:00
parent 71c4fb7beb
commit f1a808a502
8 changed files with 21 additions and 32 deletions

View File

@ -212,14 +212,12 @@ Format Input Type
WKT / EWKT ``str`` WKT / EWKT ``str``
HEX / HEXEWKB ``str`` HEX / HEXEWKB ``str``
WKB / EWKB ``buffer`` WKB / EWKB ``buffer``
GeoJSON_ ``str`` :rfc:`GeoJSON <7946>` ``str``
======================= ========== ======================= ==========
For the GeoJSON format, the SRID is set based on the ``crs`` member. If ``crs`` For the GeoJSON format, the SRID is set based on the ``crs`` member. If ``crs``
isn't provided, the SRID defaults to 4326. isn't provided, the SRID defaults to 4326.
.. _GeoJSON: https://tools.ietf.org/html/rfc7946
.. classmethod:: GEOSGeometry.from_gml(gml_string) .. classmethod:: GEOSGeometry.from_gml(gml_string)
Constructs a :class:`GEOSGeometry` from the given GML string. Constructs a :class:`GEOSGeometry` from the given GML string.

View File

@ -7,7 +7,7 @@ The syndication feed framework
quite easily. quite easily.
Django comes with a high-level syndication-feed-generating framework for Django comes with a high-level syndication-feed-generating framework for
creating RSS_ and Atom_ feeds. creating RSS_ and :rfc:`Atom <4287>` feeds.
To create any syndication feed, all you have to do is write a short To create any syndication feed, all you have to do is write a short
Python class. You can create as many feeds as you want. Python class. You can create as many feeds as you want.
@ -17,7 +17,6 @@ you want to generate feeds outside of a Web context, or in some other
lower-level way. lower-level way.
.. _RSS: http://www.whatisrss.com/ .. _RSS: http://www.whatisrss.com/
.. _Atom: https://tools.ietf.org/html/rfc4287
The high-level framework The high-level framework
======================== ========================

View File

@ -61,9 +61,7 @@ Here are some useful attributes of ``UploadedFile``:
header. This is typically provided by services, such as Google App Engine, header. This is typically provided by services, such as Google App Engine,
that intercept and handle file uploads on your behalf. As a result your that intercept and handle file uploads on your behalf. As a result your
handler may not receive the uploaded file content, but instead a URL or handler may not receive the uploaded file content, but instead a URL or
other pointer to the file. (see `RFC 2388`_ section 5.3). other pointer to the file (see :rfc:`RFC 2388 <2388#section-5.3>`).
.. _RFC 2388: https://www.ietf.org/rfc/rfc2388.txt
.. attribute:: UploadedFile.charset .. attribute:: UploadedFile.charset

View File

@ -143,11 +143,12 @@ from then on, you can treat the result as always being a string.
URI and IRI handling URI and IRI handling
~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~
Web frameworks have to deal with URLs (which are a type of IRI_). One Web frameworks have to deal with URLs (which are a type of IRI). One
requirement of URLs is that they are encoded using only ASCII characters. requirement of URLs is that they are encoded using only ASCII characters.
However, in an international environment, you might need to construct a However, in an international environment, you might need to construct a
URL from an IRI_ -- very loosely speaking, a URI_ that can contain Unicode URL from an :rfc:`IRI <3987>` -- very loosely speaking, a :rfc:`URI <2396>`
characters. Use these functions for quoting and converting an IRI to a URI: that can contain Unicode characters. Use these functions for quoting and
converting an IRI to a URI:
* The :func:`django.utils.encoding.iri_to_uri()` function, which implements the * The :func:`django.utils.encoding.iri_to_uri()` function, which implements the
conversion from IRI to URI as required by :rfc:`3987#section-3.1`. conversion from IRI to URI as required by :rfc:`3987#section-3.1`.
@ -213,9 +214,6 @@ following is always true::
So you can safely call it multiple times on the same URI/IRI without risking So you can safely call it multiple times on the same URI/IRI without risking
double-quoting problems. double-quoting problems.
.. _URI: https://www.ietf.org/rfc/rfc2396.txt
.. _IRI: https://www.ietf.org/rfc/rfc3987.txt
Models Models
====== ======

View File

@ -464,7 +464,7 @@ https://web.archive.org/web/20110718035220/http://diveintomark.org/archives/2004
.. class:: Atom1Feed(SyndicationFeed) .. class:: Atom1Feed(SyndicationFeed)
Spec: https://tools.ietf.org/html/rfc4287 Spec: :rfc:`4287`
``django.utils.functional`` ``django.utils.functional``
=========================== ===========================

View File

@ -15,21 +15,17 @@ or you can rely on the :class:`~django.middleware.http.ConditionalGetMiddleware`
middleware to set the ``ETag`` header. middleware to set the ``ETag`` header.
When the client next requests the same resource, it might send along a header When the client next requests the same resource, it might send along a header
such as either `If-modified-since`_ or `If-unmodified-since`_, containing the such as either :rfc:`If-modified-since <7232#section-3.3>` or
date of the last modification time it was sent, or either `If-match`_ or :rfc:`If-unmodified-since <7232#section-3.4>`, containing the date of the last
`If-none-match`_, containing the last ``ETag`` it was sent. modification time it was sent, or either :rfc:`If-match <7232#section-3.1>` or
If the current version of the page matches the ``ETag`` sent by the client, or :rfc:`If-none-match <7232#section-3.2>`, containing the last ``ETag`` it was
if the resource has not been modified, a 304 status code can be sent back, sent. If the current version of the page matches the ``ETag`` sent by the
instead of a full response, telling the client that nothing has changed. client, or if the resource has not been modified, a 304 status code can be sent
back, instead of a full response, telling the client that nothing has changed.
Depending on the header, if the page has been modified or does not match the Depending on the header, if the page has been modified or does not match the
``ETag`` sent by the client, a 412 status code (Precondition Failed) may be ``ETag`` sent by the client, a 412 status code (Precondition Failed) may be
returned. returned.
.. _If-match: https://tools.ietf.org/html/rfc7232#section-3.1
.. _If-none-match: https://tools.ietf.org/html/rfc7232#section-3.2
.. _If-modified-since: https://tools.ietf.org/html/rfc7232#section-3.3
.. _If-unmodified-since: https://tools.ietf.org/html/rfc7232#section-3.4
When you need more fine-grained control you may use per-view conditional When you need more fine-grained control you may use per-view conditional
processing functions. processing functions.

View File

@ -144,7 +144,8 @@ and the :setting:`SECRET_KEY` setting.
tampered with. The same invalidation happens if the client storing the tampered with. The same invalidation happens if the client storing the
cookie (e.g. your user's browser) can't store all of the session cookie and cookie (e.g. your user's browser) can't store all of the session cookie and
drops data. Even though Django compresses the data, it's still entirely drops data. Even though Django compresses the data, it's still entirely
possible to exceed the `common limit of 4096 bytes`_ per cookie. possible to exceed the :rfc:`common limit of 4096 bytes <2965#section-5.3>`
per cookie.
**No freshness guarantee** **No freshness guarantee**
@ -165,7 +166,6 @@ and the :setting:`SECRET_KEY` setting.
Finally, the size of a cookie can have an impact on the `speed of your site`_. Finally, the size of a cookie can have an impact on the `speed of your site`_.
.. _`common limit of 4096 bytes`: https://tools.ietf.org/html/rfc2965#section-5.3
.. _`replay attacks`: https://en.wikipedia.org/wiki/Replay_attack .. _`replay attacks`: https://en.wikipedia.org/wiki/Replay_attack
.. _`speed of your site`: https://yuiblog.com/blog/2007/03/01/performance-research-part-3/ .. _`speed of your site`: https://yuiblog.com/blog/2007/03/01/performance-research-part-3/

View File

@ -84,10 +84,10 @@ generate signatures. You can use a different secret by passing it to the
.. class:: Signer(key=None, sep=':', salt=None, algorithm='sha256') .. class:: Signer(key=None, sep=':', salt=None, algorithm='sha256')
Returns a signer which uses ``key`` to generate signatures and ``sep`` to Returns a signer which uses ``key`` to generate signatures and ``sep`` to
separate values. ``sep`` cannot be in the `URL safe base64 alphabet separate values. ``sep`` cannot be in the :rfc:`URL safe base64 alphabet
<https://tools.ietf.org/html/rfc4648#section-5>`_. This alphabet contains <4648#section-5>`. This alphabet contains alphanumeric characters, hyphens,
alphanumeric characters, hyphens, and underscores. ``algorithm`` must be an and underscores. ``algorithm`` must be an algorithm supported by
algorithm supported by :py:mod:`hashlib`. :py:mod:`hashlib`.
.. versionchanged:: 3.1 .. versionchanged:: 3.1