diff options
| author | Tim Graham <timograham@gmail.com> | 2013-03-22 05:50:45 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2013-03-22 14:08:55 -0400 |
| commit | f7ca464039b4f21705a8a7074f6c542c3e4937b4 (patch) | |
| tree | 832a3d71b504a8ca19a28cb67fe3cb8660970bd2 /docs/ref | |
| parent | 1363b418234d9af214ba9093014259fbb0ea2242 (diff) | |
[1.5.x] Added missing markup to docs.
Backport of 93cffc3b37 from master.
Diffstat (limited to 'docs/ref')
| -rw-r--r-- | docs/ref/class-based-views/mixins-date-based.txt | 16 | ||||
| -rw-r--r-- | docs/ref/class-based-views/mixins-single-object.txt | 2 | ||||
| -rw-r--r-- | docs/ref/clickjacking.txt | 27 | ||||
| -rw-r--r-- | docs/ref/contrib/admin/actions.txt | 2 | ||||
| -rw-r--r-- | docs/ref/contrib/csrf.txt | 2 | ||||
| -rw-r--r-- | docs/ref/contrib/gis/gdal.txt | 4 | ||||
| -rw-r--r-- | docs/ref/contrib/sitemaps.txt | 4 | ||||
| -rw-r--r-- | docs/ref/django-admin.txt | 2 | ||||
| -rw-r--r-- | docs/ref/models/fields.txt | 4 | ||||
| -rw-r--r-- | docs/ref/settings.txt | 2 | ||||
| -rw-r--r-- | docs/ref/template-response.txt | 2 | ||||
| -rw-r--r-- | docs/ref/urls.txt | 6 |
12 files changed, 37 insertions, 36 deletions
diff --git a/docs/ref/class-based-views/mixins-date-based.txt b/docs/ref/class-based-views/mixins-date-based.txt index 7ff201e5a2..75f2a77615 100644 --- a/docs/ref/class-based-views/mixins-date-based.txt +++ b/docs/ref/class-based-views/mixins-date-based.txt @@ -35,8 +35,8 @@ YearMixin Tries the following sources, in order: * The value of the :attr:`YearMixin.year` attribute. - * The value of the `year` argument captured in the URL pattern. - * The value of the `year` GET query argument. + * The value of the ``year`` argument captured in the URL pattern. + * The value of the ``year`` ``GET`` query argument. Raises a 404 if no valid year specification can be found. @@ -87,8 +87,8 @@ MonthMixin Tries the following sources, in order: * The value of the :attr:`MonthMixin.month` attribute. - * The value of the `month` argument captured in the URL pattern. - * The value of the `month` GET query argument. + * The value of the ``month`` argument captured in the URL pattern. + * The value of the ``month`` ``GET`` query argument. Raises a 404 if no valid month specification can be found. @@ -139,8 +139,8 @@ DayMixin Tries the following sources, in order: * The value of the :attr:`DayMixin.day` attribute. - * The value of the `day` argument captured in the URL pattern. - * The value of the `day` GET query argument. + * The value of the ``day`` argument captured in the URL pattern. + * The value of the ``day`` ``GET`` query argument. Raises a 404 if no valid day specification can be found. @@ -192,8 +192,8 @@ WeekMixin Tries the following sources, in order: * The value of the :attr:`WeekMixin.week` attribute. - * The value of the `week` argument captured in the URL pattern - * The value of the `week` GET query argument. + * The value of the ``week`` argument captured in the URL pattern + * The value of the ``week`` ``GET`` query argument. Raises a 404 if no valid week specification can be found. diff --git a/docs/ref/class-based-views/mixins-single-object.txt b/docs/ref/class-based-views/mixins-single-object.txt index 37468715f1..1b75acf267 100644 --- a/docs/ref/class-based-views/mixins-single-object.txt +++ b/docs/ref/class-based-views/mixins-single-object.txt @@ -63,7 +63,7 @@ SingleObjectMixin this view will display. By default, :meth:`get_queryset` returns the value of the :attr:`queryset` attribute if it is set, otherwise it constructs a :class:`~django.db.models.query.QuerySet` by calling - the `all()` method on the :attr:`model` attribute's default manager. + the ``all()`` method on the :attr:`model` attribute's default manager. .. method:: get_context_object_name(obj) diff --git a/docs/ref/clickjacking.txt b/docs/ref/clickjacking.txt index d78f8d34ac..96481906da 100644 --- a/docs/ref/clickjacking.txt +++ b/docs/ref/clickjacking.txt @@ -33,10 +33,10 @@ Preventing clickjacking Modern browsers honor the `X-Frame-Options`_ HTTP header that indicates whether or not a resource is allowed to load within a frame or iframe. If the response -contains the header with a value of SAMEORIGIN then the browser will only load -the resource in a frame if the request originated from the same site. If the -header is set to DENY then the browser will block the resource from loading in a -frame no matter which site made the request. +contains the header with a value of ``SAMEORIGIN`` then the browser will only +load the resource in a frame if the request originated from the same site. If +the header is set to ``DENY`` then the browser will block the resource from +loading in a frame no matter which site made the request. .. _X-Frame-Options: https://developer.mozilla.org/en/The_X-FRAME-OPTIONS_response_header @@ -64,15 +64,16 @@ To set the same X-Frame-Options value for all responses in your site, add ... ) -By default, the middleware will set the X-Frame-Options header to SAMEORIGIN for -every outgoing ``HttpResponse``. If you want DENY instead, set the -:setting:`X_FRAME_OPTIONS` setting:: + +By default, the middleware will set the ``X-Frame-Options`` header to +``SAMEORIGIN`` for every outgoing ``HttpResponse``. If you want ``DENY`` +instead, set the :setting:`X_FRAME_OPTIONS` setting:: X_FRAME_OPTIONS = 'DENY' When using the middleware there may be some views where you do **not** want the -X-Frame-Options header set. For those cases, you can use a view decorator that -tells the middleware not to set the header:: +``X-Frame-Options`` header set. For those cases, you can use a view decorator +that tells the middleware not to set the header:: from django.http import HttpResponse from django.views.decorators.clickjacking import xframe_options_exempt @@ -85,7 +86,7 @@ tells the middleware not to set the header:: Setting X-Frame-Options per view ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -To set the X-Frame-Options header on a per view basis, Django provides these +To set the ``X-Frame-Options`` header on a per view basis, Django provides these decorators:: from django.http import HttpResponse @@ -106,8 +107,8 @@ a decorator overrides the middleware. Limitations =========== -The `X-Frame-Options` header will only protect against clickjacking in a modern -browser. Older browsers will quietly ignore the header and need `other +The ``X-Frame-Options`` header will only protect against clickjacking in a +modern browser. Older browsers will quietly ignore the header and need `other clickjacking prevention techniques`_. Browsers that support X-Frame-Options @@ -122,7 +123,7 @@ Browsers that support X-Frame-Options See also ~~~~~~~~ -A `complete list`_ of browsers supporting X-Frame-Options. +A `complete list`_ of browsers supporting ``X-Frame-Options``. .. _complete list: https://developer.mozilla.org/en/The_X-FRAME-OPTIONS_response_header#Browser_compatibility .. _other clickjacking prevention techniques: http://en.wikipedia.org/wiki/Clickjacking#Prevention diff --git a/docs/ref/contrib/admin/actions.txt b/docs/ref/contrib/admin/actions.txt index 0a302ecd1d..c79f978850 100644 --- a/docs/ref/contrib/admin/actions.txt +++ b/docs/ref/contrib/admin/actions.txt @@ -175,7 +175,7 @@ That's easy enough to do:: make_published.short_description = "Mark selected stories as published" Notice first that we've moved ``make_published`` into a method and renamed the -`modeladmin` parameter to `self`, and second that we've now put the string +``modeladmin`` parameter to ``self``, and second that we've now put the string ``'make_published'`` in ``actions`` instead of a direct function reference. This tells the :class:`ModelAdmin` to look up the action as a method. diff --git a/docs/ref/contrib/csrf.txt b/docs/ref/contrib/csrf.txt index 32d8a705bc..8fb88f76ac 100644 --- a/docs/ref/contrib/csrf.txt +++ b/docs/ref/contrib/csrf.txt @@ -181,7 +181,7 @@ protecting the CSRF token from being sent to other domains. correctly on that version. Make sure you are running at least jQuery 1.5.1. You can use `settings.crossDomain <http://api.jquery.com/jQuery.ajax>`_ in -jQuery 1.5 and newer in order to replace the `sameOrigin` logic above: +jQuery 1.5 and newer in order to replace the ``sameOrigin`` logic above: .. code-block:: javascript diff --git a/docs/ref/contrib/gis/gdal.txt b/docs/ref/contrib/gis/gdal.txt index 161efa39de..c68030673b 100644 --- a/docs/ref/contrib/gis/gdal.txt +++ b/docs/ref/contrib/gis/gdal.txt @@ -634,8 +634,8 @@ systems and coordinate transformation:: or any other input accepted by :class:`SpatialReference` (including spatial reference WKT and PROJ.4 strings, or an integer SRID). By default nothing is returned and the geometry is transformed in-place. - However, if the `clone` keyword is set to ``True`` then a transformed clone - of this geometry is returned instead. + However, if the ``clone`` keyword is set to ``True`` then a transformed + clone of this geometry is returned instead. .. method:: intersects(other) diff --git a/docs/ref/contrib/sitemaps.txt b/docs/ref/contrib/sitemaps.txt index 3e8985b755..7c46874bfc 100644 --- a/docs/ref/contrib/sitemaps.txt +++ b/docs/ref/contrib/sitemaps.txt @@ -462,8 +462,8 @@ cron script, or some other scheduled task. The function makes an HTTP request to Google's servers, so you may not want to introduce that network overhead each time you call ``save()``. -Pinging Google via `manage.py` ------------------------------- +Pinging Google via ``manage.py`` +-------------------------------- .. django-admin:: ping_google diff --git a/docs/ref/django-admin.txt b/docs/ref/django-admin.txt index a1f5cd5f85..d471b59eef 100644 --- a/docs/ref/django-admin.txt +++ b/docs/ref/django-admin.txt @@ -1326,7 +1326,7 @@ For example, to dump data from the database with the alias ``master``:: .. django-admin-option:: --exclude Exclude a specific application from the applications whose contents is -output. For example, to specifically exclude the `auth` application from +output. For example, to specifically exclude the ``auth`` application from the output of dumpdata, you would call:: django-admin.py dumpdata --exclude=auth diff --git a/docs/ref/models/fields.txt b/docs/ref/models/fields.txt index 0cd0169681..793a1e1555 100644 --- a/docs/ref/models/fields.txt +++ b/docs/ref/models/fields.txt @@ -858,8 +858,8 @@ widget for this field is a :class:`~django.forms.NullBooleanSelect`. .. class:: PositiveIntegerField([**options]) -Like an :class:`IntegerField`, but must be either positive or zero (`0`). -The value `0` is accepted for backward compatibility reasons. +Like an :class:`IntegerField`, but must be either positive or zero (``0``). +The value ``0`` is accepted for backward compatibility reasons. ``PositiveSmallIntegerField`` ----------------------------- diff --git a/docs/ref/settings.txt b/docs/ref/settings.txt index 8624b9e9eb..9ed775981e 100644 --- a/docs/ref/settings.txt +++ b/docs/ref/settings.txt @@ -1420,7 +1420,7 @@ Example: ``"http://media.example.com/"`` MESSAGE_LEVEL ------------- -Default: `messages.INFO` +Default: ``messages.INFO`` Sets the minimum message level that will be recorded by the messages framework. See the :doc:`messages documentation </ref/contrib/messages>` for diff --git a/docs/ref/template-response.txt b/docs/ref/template-response.txt index 844b5fa46b..5c13ec7d96 100644 --- a/docs/ref/template-response.txt +++ b/docs/ref/template-response.txt @@ -120,7 +120,7 @@ Methods rendered :class:`~django.template.response.SimpleTemplateResponse` instance. - If the callback returns a value that is not `None`, this will be + If the callback returns a value that is not ``None``, this will be used as the response instead of the original response object (and will be passed to the next post rendering callback etc.) diff --git a/docs/ref/urls.txt b/docs/ref/urls.txt index 77dcc24311..d384b0e49b 100644 --- a/docs/ref/urls.txt +++ b/docs/ref/urls.txt @@ -31,12 +31,12 @@ The ``optional_dictionary`` and ``optional_name`` parameters are described in :ref:`Passing extra options to view functions <views-extra-options>`. .. note:: - Because `patterns()` is a function call, it accepts a maximum of 255 + Because ``patterns()`` is a function call, it accepts a maximum of 255 arguments (URL patterns, in this case). This is a limit for all Python function calls. This is rarely a problem in practice, because you'll - typically structure your URL patterns modularly by using `include()` + typically structure your URL patterns modularly by using ``include()`` sections. However, on the off-chance you do hit the 255-argument limit, - realize that `patterns()` returns a Python list, so you can split up the + realize that ``patterns()`` returns a Python list, so you can split up the construction of the list. :: |
