Skip to content

Commit

Permalink
[3.0.x] Used :rfc: role in various docs.
Browse files Browse the repository at this point in the history
Backport of f1a808a from master.
  • Loading branch information
felixxm committed Apr 15, 2020
1 parent 747ea48 commit e42320d
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 31 deletions.
4 changes: 1 addition & 3 deletions docs/ref/contrib/gis/geos.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
3 changes: 1 addition & 2 deletions docs/ref/contrib/syndication.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
========================
Expand Down
4 changes: 1 addition & 3 deletions docs/ref/files/uploads.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
10 changes: 4 additions & 6 deletions docs/ref/unicode.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down Expand Up @@ -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
======

Expand Down
2 changes: 1 addition & 1 deletion docs/ref/utils.txt
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,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``
===========================
Expand Down
18 changes: 7 additions & 11 deletions docs/topics/conditional-view-processing.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
4 changes: 2 additions & 2 deletions docs/topics/http/sessions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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**

Expand All @@ -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/

Expand Down
6 changes: 3 additions & 3 deletions docs/topics/signing.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ generate signatures. You can use a different secret by passing it to the
.. class:: Signer(key=None, sep=':', salt=None)

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.
separate values. ``sep`` cannot be in the :rfc:`URL safe base64 alphabet
<4648#section-5>`. This alphabet contains alphanumeric characters, hyphens,
and underscores.

Using the ``salt`` argument
---------------------------
Expand Down

0 comments on commit e42320d

Please sign in to comment.