Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #8979 -- Made a bunch of typo/formatting fixes to the docs. Tha…

…nks, ramiro

git-svn-id: http://code.djangoproject.com/svn/django/trunk@8987 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 74f386dba274e319eb9e76cfb6f5d38e602104d9 1 parent 834a041
Adrian Holovaty authored September 09, 2008
4  docs/ref/contrib/admin.txt
@@ -924,7 +924,9 @@ better to override only the section of the template which you need to change.
924 924
 To continue the example above, we want to add a new link next to the ``History``
925 925
 tool for the ``Page`` model. After looking at ``change_form.html`` we determine
926 926
 that we only need to override the ``object-tools`` block. Therefore here is our
927  
-new ``change_form.html`` ::
  927
+new ``change_form.html`` :
  928
+
  929
+.. code-block:: html+django
928 930
 
929 931
     {% extends "admin/change_form.html" %}
930 932
     {% load i18n %}
2  docs/ref/contrib/comments/index.txt
@@ -7,6 +7,8 @@ Django's comments framework
7 7
 .. module:: django.contrib.comments
8 8
    :synopsis: Django's comment framework
9 9
 
  10
+.. highlightlang:: html+django
  11
+
10 12
 Django includes a simple, yet customizable comments framework. The built-in
11 13
 comments framework can be used to attach comments to any model, so you can use
12 14
 it for comments on blog entries, photos, book chapters, or anything else.
6  docs/ref/contrib/formtools/form-wizard.txt
@@ -169,8 +169,10 @@ You can specify it in two ways:
169 169
     * Pass :attr:`~django.contrib.formtools.wizard.FormWizard.extra_context`
170 170
       as extra parameters in the URLconf.
171 171
 
172  
-Here's a full example template::
173  
-  
  172
+Here's a full example template:
  173
+
  174
+.. code-block:: html+django
  175
+
174 176
     {% extends "base.html" %}
175 177
 
176 178
     {% block content %}
2  docs/ref/django-admin.txt
@@ -385,7 +385,7 @@ makemessages
385 385
 ------------
386 386
 
387 387
 .. versionchanged:: 1.0
388  
-   Before 1.0 this was the "bin/make-messages.py" command.
  388
+   Before 1.0 this was the ``bin/make-messages.py`` command.
389 389
 
390 390
 Runs over the entire source tree of the current directory and pulls out all
391 391
 strings marked for translation. It creates (or updates) a message file in the
2  docs/ref/files/file.txt
@@ -88,7 +88,7 @@ Additional ``ImageField`` attributes
88 88
 
89 89
 .. attribute:: File.height
90 90
 
91  
-    Heigght of the image.
  91
+    Height of the image.
92 92
 
93 93
 Additional methods on files attached to objects
94 94
 -----------------------------------------------
23  docs/ref/request-response.txt
@@ -93,18 +93,7 @@ All attributes except ``session`` should be considered read-only.
93 93
     A standard Python dictionary containing all cookies. Keys and values are
94 94
     strings.
95 95
 
96  
-.. attribute:: HttpRequest.FILES 
97  
-
98  
-    .. admonition:: Changed in Django development version
99  
-        
100  
-        In previous versions of Django, ``request.FILES`` contained
101  
-        simple ``dict`` objects representing uploaded files. This is
102  
-        no longer true -- files are represented by ``UploadedFile``
103  
-        objects as described below.
104  
-        
105  
-        These ``UploadedFile`` objects will emulate the old-style ``dict``
106  
-        interface, but this is deprecated and will be removed in the next
107  
-        release of Django.
  96
+.. attribute:: HttpRequest.FILES
108 97
 
109 98
     A dictionary-like object containing all uploaded files. Each key in
110 99
     ``FILES`` is the ``name`` from the ``<input type="file" name="" />``. Each
@@ -123,6 +112,16 @@ All attributes except ``session`` should be considered read-only.
123 112
     ``enctype="multipart/form-data"``. Otherwise, ``FILES`` will be a blank
124 113
     dictionary-like object.
125 114
 
  115
+    .. versionchanged:: 1.0
  116
+
  117
+    In previous versions of Django, ``request.FILES`` contained simple ``dict``
  118
+    objects representing uploaded files. This is no longer true -- files are
  119
+    represented by ``UploadedFile`` objects as described below.
  120
+
  121
+    These ``UploadedFile`` objects will emulate the old-style ``dict``
  122
+    interface, but this is deprecated and will be removed in the next release of
  123
+    Django.
  124
+
126 125
 .. attribute:: HttpRequest.META
127 126
 
128 127
     A standard Python dictionary containing all available HTTP headers.
10  docs/ref/templates/api.txt
@@ -29,7 +29,9 @@ content from a database or enable access to other template tags.
29 29
 
30 30
 Block tags are surrounded by ``"{%"`` and ``"%}"``.
31 31
 
32  
-Example template with block tags::
  32
+Example template with block tags:
  33
+
  34
+.. code-block:: html+django
33 35
 
34 36
     {% if is_logged_in %}Thanks for logging in!{% else %}Please log in.{% endif %}
35 37
 
@@ -37,7 +39,9 @@ A **variable** is a symbol within a template that outputs a value.
37 39
 
38 40
 Variable tags are surrounded by ``"{{"`` and ``"}}"``.
39 41
 
40  
-Example template with variables::
  42
+Example template with variables:
  43
+
  44
+.. code-block:: html+django
41 45
 
42 46
     My first name is {{ first_name }}. My last name is {{ last_name }}.
43 47
 
@@ -566,7 +570,7 @@ returns the resulting string::
566 570
 
567 571
 The ``render_to_string`` shortcut takes one required argument --
568 572
 ``template_name``, which should be the name of the template to load
569  
-and render -- and two optional arguments::
  573
+and render -- and two optional arguments:
570 574
 
571 575
     dictionary
572 576
         A dictionary to be used as variables and values for the
41  docs/ref/templates/builtins.txt
@@ -14,6 +14,8 @@ documentation for any custom tags or filters installed.
14 14
 Built-in tag reference
15 15
 ----------------------
16 16
 
  17
+.. highlightlang:: html+django
  18
+
17 19
 .. templatetag:: autoescape
18 20
 
19 21
 autoescape
@@ -473,7 +475,9 @@ Regroup a list of alike objects by a common attribute.
473 475
 
474 476
 This complex tag is best illustrated by use of an example: say that ``people``
475 477
 is a list of people represented by dictionaries with ``first_name``,
476  
-``last_name``, and ``gender`` keys::
  478
+``last_name``, and ``gender`` keys:
  479
+
  480
+.. code-block:: python
477 481
 
478 482
     people = [
479 483
         {'first_name': 'George', 'last_name': 'Bush', 'gender': 'Male'},
@@ -530,7 +534,9 @@ the fact that the ``people`` list was ordered by ``gender`` in the first place.
530 534
 If the ``people`` list did *not* order its members by ``gender``, the regrouping
531 535
 would naively display more than one group for a single gender. For example,
532 536
 say the ``people`` list was set to this (note that the males are not grouped
533  
-together)::
  537
+together):
  538
+
  539
+.. code-block:: python
534 540
 
535 541
     people = [
536 542
         {'first_name': 'Bill', 'last_name': 'Clinton', 'gender': 'Male'},
@@ -657,12 +663,16 @@ arguments in the URL. All arguments required by the URLconf should be present.
657 663
 
658 664
 For example, suppose you have a view, ``app_views.client``, whose URLconf
659 665
 takes a client ID (here, ``client()`` is a method inside the views file
660  
-``app_views.py``). The URLconf line might look like this::
  666
+``app_views.py``). The URLconf line might look like this:
  667
+
  668
+.. code-block:: python
661 669
 
662 670
     ('^client/(\d+)/$', 'app_views.client')
663 671
 
664 672
 If this app's URLconf is included into the project's URLconf under a path
665  
-such as this::
  673
+such as this:
  674
+
  675
+.. code-block:: python
666 676
 
667 677
     ('^clients/', include('project_name.app_name.urls'))
668 678
 
@@ -682,19 +692,18 @@ Note that if the URL you're reversing doesn't exist, you'll get an
682 692
 :exc:`NoReverseMatch` exception raised, which will cause your site to display an
683 693
 error page.
684 694
 
685  
-**New in development verson:** If you'd like to retrieve a URL without displaying it,
686  
-you can use a slightly different call:
  695
+.. versionadded:: 1.0
  696
+
  697
+If you'd like to retrieve a URL without displaying it, you can use a slightly
  698
+different call::
687 699
 
688  
-.. code-block:: html+django
689 700
 
690 701
     {% url path.to.view arg, arg2 as the_url %}
691 702
     
692 703
     <a href="{{ the_url }}">I'm linking to {{ the_url }}</a>
693 704
     
694 705
 This ``{% url ... as var %}`` syntax will *not* cause an error if the view is
695  
-missing. In practice you'll use this to link to views that are optional:
696  
-
697  
-.. code-block:: html+django
  706
+missing. In practice you'll use this to link to views that are optional::
698 707
 
699 708
     {% url path.to.view as the_url %}
700 709
     {% if the_url %}
@@ -845,7 +854,9 @@ For example::
845 854
 
846 855
     {{ value|dictsort:"name" }}
847 856
 
848  
-If ``value`` is::
  857
+If ``value`` is:
  858
+
  859
+.. code-block:: python
849 860
 
850 861
     [
851 862
         {'name': 'zed', 'age': 19},
@@ -853,7 +864,9 @@ If ``value`` is::
853 864
         {'name': 'joe', 'age': 31},
854 865
     ]
855 866
 
856  
-then the output would be::
  867
+then the output would be:
  868
+
  869
+.. code-block:: python
857 870
 
858 871
     [
859 872
         {'name': 'amy', 'age': 22},
@@ -1274,7 +1287,9 @@ Uses the same syntax as Python's list slicing. See
1274 1287
 http://diveintopython.org/native_data_types/lists.html#odbchelper.list.slice
1275 1288
 for an introduction.
1276 1289
 
1277  
-Example: ``{{ some_list|slice:":2" }}``
  1290
+Example::
  1291
+
  1292
+    {{ some_list|slice:":2" }}
1278 1293
 
1279 1294
 .. templatefilter:: slugify
1280 1295
 
8  docs/topics/forms/formsets.txt
@@ -306,7 +306,9 @@ management form inside the template. Lets look at a sample view::
306 306
             formset = ArticleFormSet()
307 307
         return render_to_response('manage_articles.html', {'formset': formset})
308 308
 
309  
-The ``manage_articles.html`` template might look like this::
  309
+The ``manage_articles.html`` template might look like this:
  310
+
  311
+.. code-block:: html+django
310 312
 
311 313
     <form method="POST" action="">
312 314
         {{ formset.management_form }}
@@ -318,7 +320,9 @@ The ``manage_articles.html`` template might look like this::
318 320
     </form>
319 321
 
320 322
 However the above can be slightly shortcutted and let the formset itself deal
321  
-with the management form::
  323
+with the management form:
  324
+
  325
+.. code-block:: html+django
322 326
 
323 327
     <form method="POST" action="">
324 328
         <table>
14  docs/topics/forms/index.txt
@@ -10,6 +10,8 @@ Working with forms
10 10
     For a more detailed look at the forms API, see :ref:`ref-forms-api`. For
11 11
     documentation of the available field types, see :ref:`ref-forms-fields`.
12 12
 
  13
+.. highlightlang:: html+django
  14
+
13 15
 ``django.forms`` is Django's form-handling library.
14 16
 
15 17
 While it is possible to process form submissions just using Django's
@@ -60,7 +62,9 @@ make use of a declarative style that you'll be familiar with if you've used
60 62
 Django's database models.
61 63
 
62 64
 For example, consider a form used to implement "contact me" functionality on a
63  
-personal Web site::
  65
+personal Web site:
  66
+
  67
+.. code-block:: python
64 68
 
65 69
     from django import forms
66 70
 
@@ -82,7 +86,9 @@ description.
82 86
 Using a form in a view
83 87
 ----------------------
84 88
 
85  
-The standard pattern for processing a form in a view looks like this::
  89
+The standard pattern for processing a form in a view looks like this:
  90
+
  91
+.. code-block:: python
86 92
 
87 93
    def contact(request):
88 94
        if request.method == 'POST': # If the form has been submitted...
@@ -133,7 +139,9 @@ also be converted in to the relevant Python types for you. In the above example,
133 139
 ``cc_myself`` will be a boolean value. Likewise, fields such as ``IntegerField``
134 140
 and ``FloatField`` convert values to a Python int and float respectively.
135 141
 
136  
-Extending the above example, here's how the form data could be processed::
  142
+Extending the above example, here's how the form data could be processed:
  143
+
  144
+.. code-block:: python
137 145
 
138 146
     if form.is_valid():
139 147
         subject = form.cleaned_data['subject']
2  docs/topics/http/sessions.txt
@@ -36,7 +36,7 @@ from your ``INSTALLED_APPS``. It'll save you a small bit of overhead.
36 36
 Configuring the session engine
37 37
 ==============================
38 38
 
39  
-.. versionadded:: 1.0.
  39
+.. versionadded:: 1.0
40 40
 
41 41
 By default, Django stores sessions in your database (using the model
42 42
 ``django.contrib.sessions.models.Session``). Though this is convenient, in
2  docs/topics/i18n.txt
@@ -395,7 +395,7 @@ obtain) the language translations themselves. Here's how that works.
395 395
     application) and English strings (from Django itself). If you want to
396 396
     support a locale for your application that is not already part of
397 397
     Django, you'll need to make at least a minimal translation of the Django
398  
-    core. See the relevant :ref:LocaleMiddleware note`<locale-middleware-notes>`
  398
+    core. See the relevant :ref:`LocaleMiddleware note<locale-middleware-notes>`
399 399
     for more details.
400 400
 
401 401
 Message files
2  docs/topics/templates.txt
@@ -38,6 +38,8 @@ or CheetahTemplate_, you should feel right at home with Django's templates.
38 38
 Templates
39 39
 =========
40 40
 
  41
+.. highlightlang:: html+django
  42
+
41 43
 A template is simply a text file. It can generate any text-based format (HTML,
42 44
 XML, CSV, etc.).
43 45
 

0 notes on commit 74f386d

Please sign in to comment.
Something went wrong with that request. Please try again.