Code

Ticket #8979: doc-fixes-r8985.diff

File doc-fixes-r8985.diff, 12.7 KB (added by ramiro, 6 years ago)
Line 
1diff -r 07be6b6eaea0 docs/ref/contrib/admin.txt
2--- a/docs/ref/contrib/admin.txt        Mon Sep 08 02:45:17 2008 -0300
3+++ b/docs/ref/contrib/admin.txt        Mon Sep 08 20:49:49 2008 -0300
4@@ -924,7 +924,9 @@ To continue the example above, we want t
5 To continue the example above, we want to add a new link next to the ``History``
6 tool for the ``Page`` model. After looking at ``change_form.html`` we determine
7 that we only need to override the ``object-tools`` block. Therefore here is our
8-new ``change_form.html`` ::
9+new ``change_form.html`` :
10+
11+.. code-block:: html+django
12 
13     {% extends "admin/change_form.html" %}
14     {% load i18n %}
15diff -r 07be6b6eaea0 docs/ref/contrib/comments/index.txt
16--- a/docs/ref/contrib/comments/index.txt       Mon Sep 08 02:45:17 2008 -0300
17+++ b/docs/ref/contrib/comments/index.txt       Mon Sep 08 20:49:49 2008 -0300
18@@ -6,6 +6,8 @@ Django's comments framework
19 
20 .. module:: django.contrib.comments
21    :synopsis: Django's comment framework
22+
23+.. highlightlang:: html+django
24 
25 Django includes a simple, yet customizable comments framework. The built-in
26 comments framework can be used to attach comments to any model, so you can use
27diff -r 07be6b6eaea0 docs/ref/contrib/formtools/form-wizard.txt
28--- a/docs/ref/contrib/formtools/form-wizard.txt        Mon Sep 08 02:45:17 2008 -0300
29+++ b/docs/ref/contrib/formtools/form-wizard.txt        Mon Sep 08 20:49:49 2008 -0300
30@@ -169,8 +169,10 @@ You can specify it in two ways:
31     * Pass :attr:`~django.contrib.formtools.wizard.FormWizard.extra_context`
32       as extra parameters in the URLconf.
33 
34-Here's a full example template::
35
36+Here's a full example template:
37+
38+.. code-block:: html+django
39+
40     {% extends "base.html" %}
41 
42     {% block content %}
43diff -r 07be6b6eaea0 docs/ref/django-admin.txt
44--- a/docs/ref/django-admin.txt Mon Sep 08 02:45:17 2008 -0300
45+++ b/docs/ref/django-admin.txt Mon Sep 08 20:49:49 2008 -0300
46@@ -385,7 +385,7 @@ makemessages
47 ------------
48 
49 .. versionchanged:: 1.0
50-   Before 1.0 this was the "bin/make-messages.py" command.
51+   Before 1.0 this was the ``bin/make-messages.py`` command.
52 
53 Runs over the entire source tree of the current directory and pulls out all
54 strings marked for translation. It creates (or updates) a message file in the
55diff -r 07be6b6eaea0 docs/ref/files/file.txt
56--- a/docs/ref/files/file.txt   Mon Sep 08 02:45:17 2008 -0300
57+++ b/docs/ref/files/file.txt   Mon Sep 08 20:49:49 2008 -0300
58@@ -88,7 +88,7 @@ Additional ``ImageField`` attributes
59 
60 .. attribute:: File.height
61 
62-    Heigght of the image.
63+    Height of the image.
64 
65 Additional methods on files attached to objects
66 -----------------------------------------------
67diff -r 07be6b6eaea0 docs/ref/request-response.txt
68--- a/docs/ref/request-response.txt     Mon Sep 08 02:45:17 2008 -0300
69+++ b/docs/ref/request-response.txt     Mon Sep 08 20:49:49 2008 -0300
70@@ -93,18 +93,7 @@ All attributes except ``session`` should
71     A standard Python dictionary containing all cookies. Keys and values are
72     strings.
73 
74-.. attribute:: HttpRequest.FILES
75-
76-    .. admonition:: Changed in Django development version
77-       
78-        In previous versions of Django, ``request.FILES`` contained
79-        simple ``dict`` objects representing uploaded files. This is
80-        no longer true -- files are represented by ``UploadedFile``
81-        objects as described below.
82-       
83-        These ``UploadedFile`` objects will emulate the old-style ``dict``
84-        interface, but this is deprecated and will be removed in the next
85-        release of Django.
86+.. attribute:: HttpRequest.FILES
87 
88     A dictionary-like object containing all uploaded files. Each key in
89     ``FILES`` is the ``name`` from the ``<input type="file" name="" />``. Each
90@@ -122,6 +111,16 @@ All attributes except ``session`` should
91     and the ``<form>`` that posted to the request had
92     ``enctype="multipart/form-data"``. Otherwise, ``FILES`` will be a blank
93     dictionary-like object.
94+
95+    .. versionchanged:: 1.0
96+
97+    In previous versions of Django, ``request.FILES`` contained simple ``dict``
98+    objects representing uploaded files. This is no longer true -- files are
99+    represented by ``UploadedFile`` objects as described below.
100+
101+    These ``UploadedFile`` objects will emulate the old-style ``dict``
102+    interface, but this is deprecated and will be removed in the next release of
103+    Django.
104 
105 .. attribute:: HttpRequest.META
106 
107diff -r 07be6b6eaea0 docs/ref/templates/api.txt
108--- a/docs/ref/templates/api.txt        Mon Sep 08 02:45:17 2008 -0300
109+++ b/docs/ref/templates/api.txt        Mon Sep 08 20:49:49 2008 -0300
110@@ -29,7 +29,9 @@ content from a database or enable access
111 
112 Block tags are surrounded by ``"{%"`` and ``"%}"``.
113 
114-Example template with block tags::
115+Example template with block tags:
116+
117+.. code-block:: html+django
118 
119     {% if is_logged_in %}Thanks for logging in!{% else %}Please log in.{% endif %}
120 
121@@ -37,7 +39,9 @@ A **variable** is a symbol within a temp
122 
123 Variable tags are surrounded by ``"{{"`` and ``"}}"``.
124 
125-Example template with variables::
126+Example template with variables:
127+
128+.. code-block:: html+django
129 
130     My first name is {{ first_name }}. My last name is {{ last_name }}.
131 
132@@ -566,7 +570,7 @@ returns the resulting string::
133 
134 The ``render_to_string`` shortcut takes one required argument --
135 ``template_name``, which should be the name of the template to load
136-and render -- and two optional arguments::
137+and render -- and two optional arguments:
138 
139     dictionary
140         A dictionary to be used as variables and values for the
141diff -r 07be6b6eaea0 docs/ref/templates/builtins.txt
142--- a/docs/ref/templates/builtins.txt   Mon Sep 08 02:45:17 2008 -0300
143+++ b/docs/ref/templates/builtins.txt   Mon Sep 08 20:49:49 2008 -0300
144@@ -13,6 +13,8 @@ documentation for any custom tags or fil
145 
146 Built-in tag reference
147 ----------------------
148+
149+.. highlightlang:: html+django
150 
151 .. templatetag:: autoescape
152 
153@@ -473,7 +475,9 @@ Regroup a list of alike objects by a com
154 
155 This complex tag is best illustrated by use of an example: say that ``people``
156 is a list of people represented by dictionaries with ``first_name``,
157-``last_name``, and ``gender`` keys::
158+``last_name``, and ``gender`` keys:
159+
160+.. code-block:: python
161 
162     people = [
163         {'first_name': 'George', 'last_name': 'Bush', 'gender': 'Male'},
164@@ -530,7 +534,9 @@ If the ``people`` list did *not* order i
165 If the ``people`` list did *not* order its members by ``gender``, the regrouping
166 would naively display more than one group for a single gender. For example,
167 say the ``people`` list was set to this (note that the males are not grouped
168-together)::
169+together):
170+
171+.. code-block:: python
172 
173     people = [
174         {'first_name': 'Bill', 'last_name': 'Clinton', 'gender': 'Male'},
175@@ -657,12 +663,16 @@ arguments in the URL. All arguments requ
176 
177 For example, suppose you have a view, ``app_views.client``, whose URLconf
178 takes a client ID (here, ``client()`` is a method inside the views file
179-``app_views.py``). The URLconf line might look like this::
180+``app_views.py``). The URLconf line might look like this:
181+
182+.. code-block:: python
183 
184     ('^client/(\d+)/$', 'app_views.client')
185 
186 If this app's URLconf is included into the project's URLconf under a path
187-such as this::
188+such as this:
189+
190+.. code-block:: python
191 
192     ('^clients/', include('project_name.app_name.urls'))
193 
194@@ -682,19 +692,18 @@ Note that if the URL you're reversing do
195 :exc:`NoReverseMatch` exception raised, which will cause your site to display an
196 error page.
197 
198-**New in development verson:** If you'd like to retrieve a URL without displaying it,
199-you can use a slightly different call:
200+.. versionadded:: 1.0
201 
202-.. code-block:: html+django
203+If you'd like to retrieve a URL without displaying it, you can use a slightly
204+different call::
205+
206 
207     {% url path.to.view arg, arg2 as the_url %}
208     
209     <a href="{{ the_url }}">I'm linking to {{ the_url }}</a>
210     
211 This ``{% url ... as var %}`` syntax will *not* cause an error if the view is
212-missing. In practice you'll use this to link to views that are optional:
213-
214-.. code-block:: html+django
215+missing. In practice you'll use this to link to views that are optional::
216 
217     {% url path.to.view as the_url %}
218     {% if the_url %}
219@@ -845,7 +854,9 @@ For example::
220 
221     {{ value|dictsort:"name" }}
222 
223-If ``value`` is::
224+If ``value`` is:
225+
226+.. code-block:: python
227 
228     [
229         {'name': 'zed', 'age': 19},
230@@ -853,7 +864,9 @@ If ``value`` is::
231         {'name': 'joe', 'age': 31},
232     ]
233 
234-then the output would be::
235+then the output would be:
236+
237+.. code-block:: python
238 
239     [
240         {'name': 'amy', 'age': 22},
241@@ -1274,7 +1287,9 @@ http://diveintopython.org/native_data_ty
242 http://diveintopython.org/native_data_types/lists.html#odbchelper.list.slice
243 for an introduction.
244 
245-Example: ``{{ some_list|slice:":2" }}``
246+Example::
247+
248+    {{ some_list|slice:":2" }}
249 
250 .. templatefilter:: slugify
251 
252diff -r 07be6b6eaea0 docs/topics/forms/formsets.txt
253--- a/docs/topics/forms/formsets.txt    Mon Sep 08 02:45:17 2008 -0300
254+++ b/docs/topics/forms/formsets.txt    Mon Sep 08 20:49:49 2008 -0300
255@@ -306,7 +306,9 @@ management form inside the template. Let
256             formset = ArticleFormSet()
257         return render_to_response('manage_articles.html', {'formset': formset})
258 
259-The ``manage_articles.html`` template might look like this::
260+The ``manage_articles.html`` template might look like this:
261+
262+.. code-block:: html+django
263 
264     <form method="POST" action="">
265         {{ formset.management_form }}
266@@ -318,7 +320,9 @@ The ``manage_articles.html`` template mi
267     </form>
268 
269 However the above can be slightly shortcutted and let the formset itself deal
270-with the management form::
271+with the management form:
272+
273+.. code-block:: html+django
274 
275     <form method="POST" action="">
276         <table>
277diff -r 07be6b6eaea0 docs/topics/forms/index.txt
278--- a/docs/topics/forms/index.txt       Mon Sep 08 02:45:17 2008 -0300
279+++ b/docs/topics/forms/index.txt       Mon Sep 08 20:49:49 2008 -0300
280@@ -9,6 +9,8 @@ Working with forms
281     This document provides an introduction to Django's form handling features.
282     For a more detailed look at the forms API, see :ref:`ref-forms-api`. For
283     documentation of the available field types, see :ref:`ref-forms-fields`.
284+
285+.. highlightlang:: html+django
286 
287 ``django.forms`` is Django's form-handling library.
288 
289@@ -60,7 +62,9 @@ Django's database models.
290 Django's database models.
291 
292 For example, consider a form used to implement "contact me" functionality on a
293-personal Web site::
294+personal Web site:
295+
296+.. code-block:: python
297 
298     from django import forms
299 
300@@ -82,7 +86,9 @@ Using a form in a view
301 Using a form in a view
302 ----------------------
303 
304-The standard pattern for processing a form in a view looks like this::
305+The standard pattern for processing a form in a view looks like this:
306+
307+.. code-block:: python
308 
309    def contact(request):
310        if request.method == 'POST': # If the form has been submitted...
311@@ -133,7 +139,9 @@ also be converted in to the relevant Pyt
312 ``cc_myself`` will be a boolean value. Likewise, fields such as ``IntegerField``
313 and ``FloatField`` convert values to a Python int and float respectively.
314 
315-Extending the above example, here's how the form data could be processed::
316+Extending the above example, here's how the form data could be processed:
317+
318+.. code-block:: python
319 
320     if form.is_valid():
321         subject = form.cleaned_data['subject']
322diff -r 07be6b6eaea0 docs/topics/http/sessions.txt
323--- a/docs/topics/http/sessions.txt     Mon Sep 08 02:45:17 2008 -0300
324+++ b/docs/topics/http/sessions.txt     Mon Sep 08 20:49:49 2008 -0300
325@@ -36,7 +36,7 @@ Configuring the session engine
326 Configuring the session engine
327 ==============================
328 
329-.. versionadded:: 1.0.
330+.. versionadded:: 1.0
331 
332 By default, Django stores sessions in your database (using the model
333 ``django.contrib.sessions.models.Session``). Though this is convenient, in
334diff -r 07be6b6eaea0 docs/topics/i18n.txt
335--- a/docs/topics/i18n.txt      Mon Sep 08 02:45:17 2008 -0300
336+++ b/docs/topics/i18n.txt      Mon Sep 08 20:49:49 2008 -0300
337@@ -395,7 +395,7 @@ obtain) the language translations themse
338     application) and English strings (from Django itself). If you want to
339     support a locale for your application that is not already part of
340     Django, you'll need to make at least a minimal translation of the Django
341-    core. See the relevant :ref:LocaleMiddleware note`<locale-middleware-notes>`
342+    core. See the relevant :ref:`LocaleMiddleware note<locale-middleware-notes>`
343     for more details.
344 
345 Message files
346diff -r 07be6b6eaea0 docs/topics/templates.txt
347--- a/docs/topics/templates.txt Mon Sep 08 02:45:17 2008 -0300
348+++ b/docs/topics/templates.txt Mon Sep 08 20:49:49 2008 -0300
349@@ -37,6 +37,8 @@ or CheetahTemplate_, you should feel rig
350 
351 Templates
352 =========
353+
354+.. highlightlang:: html+django
355 
356 A template is simply a text file. It can generate any text-based format (HTML,
357 XML, CSV, etc.).