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``
HEX / HEXEWKB ``str``
WKB / EWKB ``buffer``
GeoJSON_ ``str``
:rfc:`GeoJSON <7946>` ``str``
======================= ==========
For the GeoJSON format, the SRID is set based on the ``crs`` member. If ``crs``
isn't provided, the SRID defaults to 4326.
.. _GeoJSON: https://tools.ietf.org/html/rfc7946
.. classmethod:: GEOSGeometry.from_gml(gml_string)
Constructs a :class:`GEOSGeometry` from the given GML string.

View File

@ -7,7 +7,7 @@ The syndication feed framework
quite easily.
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
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.
.. _RSS: http://www.whatisrss.com/
.. _Atom: https://tools.ietf.org/html/rfc4287
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,
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
other pointer to the file. (see `RFC 2388`_ section 5.3).
.. _RFC 2388: https://www.ietf.org/rfc/rfc2388.txt
other pointer to the file (see :rfc:`RFC 2388 <2388#section-5.3>`).
.. 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
~~~~~~~~~~~~~~~~~~~~
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.
However, in an international environment, you might need to construct a
URL from an IRI_ -- very loosely speaking, a URI_ that can contain Unicode
characters. Use these functions for quoting and converting an IRI to a URI:
URL from an :rfc:`IRI <3987>` -- very loosely speaking, a :rfc:`URI <2396>`
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
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
double-quoting problems.
.. _URI: https://www.ietf.org/rfc/rfc2396.txt
.. _IRI: https://www.ietf.org/rfc/rfc3987.txt
Models
======

View File

@ -464,7 +464,7 @@ https://web.archive.org/web/20110718035220/http://diveintomark.org/archives/2004
.. class:: Atom1Feed(SyndicationFeed)
Spec: https://tools.ietf.org/html/rfc4287
Spec: :rfc:`4287`
``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.
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
date of the last modification time it was sent, or either `If-match`_ or
`If-none-match`_, containing the last ``ETag`` it was sent.
If the current version of the page matches the ``ETag`` sent by the 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.
such as either :rfc:`If-modified-since <7232#section-3.3>` or
:rfc:`If-unmodified-since <7232#section-3.4>`, containing the date of the last
modification time it was sent, or either :rfc:`If-match <7232#section-3.1>` or
:rfc:`If-none-match <7232#section-3.2>`, containing the last ``ETag`` it was
sent. If the current version of the page matches the ``ETag`` sent by the
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
``ETag`` sent by the client, a 412 status code (Precondition Failed) may be
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
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
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
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**
@ -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`_.
.. _`common limit of 4096 bytes`: https://tools.ietf.org/html/rfc2965#section-5.3
.. _`replay attacks`: https://en.wikipedia.org/wiki/Replay_attack
.. _`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')
Returns a signer which uses ``key`` to generate signatures and ``sep`` to
separate values. ``sep`` cannot be in the `URL safe base64 alphabet
<https://tools.ietf.org/html/rfc4648#section-5>`_. This alphabet contains
alphanumeric characters, hyphens, and underscores. ``algorithm`` must be an
algorithm supported by :py:mod:`hashlib`.
separate values. ``sep`` cannot be in the :rfc:`URL safe base64 alphabet
<4648#section-5>`. This alphabet contains alphanumeric characters, hyphens,
and underscores. ``algorithm`` must be an algorithm supported by
:py:mod:`hashlib`.
.. versionchanged:: 3.1