From 0162eac9e2cd317476dd4086c36caf138c96f6bc Mon Sep 17 00:00:00 2001 From: Jason Pellerin Date: Mon, 4 Dec 2006 21:01:18 +0000 Subject: [multi-db] Merged trunk to [4100]. Some tests still failing. git-svn-id: http://code.djangoproject.com/svn/django/branches/multiple-db-support@4158 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- docs/forms.txt | 8 ++++---- docs/sitemaps.txt | 19 ++++++++++--------- docs/templates.txt | 18 +++++++++--------- docs/templates_python.txt | 2 +- docs/testing.txt | 2 +- 5 files changed, 25 insertions(+), 24 deletions(-) (limited to 'docs') diff --git a/docs/forms.txt b/docs/forms.txt index 1c683c44f7..ff192a4717 100644 --- a/docs/forms.txt +++ b/docs/forms.txt @@ -611,13 +611,13 @@ fails. If no message is passed in, a default message is used. string comparison here, you will need to write your own validator. ``NumberIsInRange`` - Takes two boundary number, ``lower`` and ``upper`` and checks that the + Takes two boundary numbers, ``lower`` and ``upper``, and checks that the field is greater than ``lower`` (if given) and less than ``upper`` (if given). - Both checks are inclusive; that is, ``NumberIsInRange(10, 20)`` will allow - values of both 10 and 20. This validator only checks numeric fields - (i.e. floats and integer fields). + Both checks are inclusive. That is, ``NumberIsInRange(10, 20)`` will allow + values of both 10 and 20. This validator only checks numeric values + (e.g., float and integer values). ``IsAPowerOf`` Takes an integer argument and when called as a validator, checks that the diff --git a/docs/sitemaps.txt b/docs/sitemaps.txt index fec65572f2..7414567b16 100644 --- a/docs/sitemaps.txt +++ b/docs/sitemaps.txt @@ -5,9 +5,9 @@ The sitemap framework **New in Django development version**. Django comes with a high-level sitemap-generating framework that makes -creating `Google Sitemap`_ XML files easy. +creating sitemap_ XML files easy. -.. _Google Sitemap: http://www.google.com/webmasters/sitemaps/docs/en/protocol.html +.. _sitemap: http://www.sitemaps.org/ Overview ======== @@ -55,11 +55,12 @@ URLconf_: This tells Django to build a sitemap when a client accesses ``/sitemap.xml``. -The name of the sitemap file is not important, but the location is. Google will -only index links in your sitemap for the current URL level and below. For -instance, if ``sitemap.xml`` lives in your root directory, it may reference any -URL in your site. However, if your sitemap lives at ``/content/sitemap.xml``, -it may only reference URLs that begin with ``/content/``. +The name of the sitemap file is not important, but the location is. Search +engines will only index links in your sitemap for the current URL level and +below. For instance, if ``sitemap.xml`` lives in your root directory, it may +reference any URL in your site. However, if your sitemap lives at +``/content/sitemap.xml``, it may only reference URLs that begin with +``/content/``. The sitemap view takes an extra, required argument: ``{'sitemaps': sitemaps}``. ``sitemaps`` should be a dictionary that maps a short section label (e.g., @@ -199,9 +200,9 @@ If it's an attribute, its value should be either a string or float representing the priority of *every* object returned by ``items()``. Example values for ``priority``: ``0.4``, ``1.0``. The default priority of a -page is ``0.5``. See Google's documentation for more documentation. +page is ``0.5``. See the `sitemaps.org documentation`_ for more. -.. _Google's documentation: http://www.google.com/webmasters/sitemaps/docs/en/protocol.html +.. _sitemaps.org documentation: http://www.sitemaps.org/protocol.html#prioritydef Shortcuts ========= diff --git a/docs/templates.txt b/docs/templates.txt index cb06fa27d9..b4cc47b9f3 100644 --- a/docs/templates.txt +++ b/docs/templates.txt @@ -473,7 +473,7 @@ block are output:: In the above, if ``athlete_list`` is not empty, the number of athletes will be displayed by the ``{{ athlete_list|length }}`` variable. -As you can see, the ``if`` tag can take an option ``{% else %}`` clause that +As you can see, the ``if`` tag can take an optional ``{% else %}`` clause that will be displayed if the test fails. ``if`` tags may use ``and``, ``or`` or ``not`` to test a number of variables or @@ -537,15 +537,15 @@ The 'ifchanged' block tag is used within a loop. It has two possible uses. {% ifchanged %}

{{ date|date:"F" }}

{% endifchanged %} {{ date|date:"j" }} {% endfor %} - -2. If given a variable, check if that variable has changed. For example, the - following shows the date every time it changes, but only shows the hour if both - the hour and the date has changed:: - + +2. **New in Django development version.** If given a variable, check whether that + variable has changed. For example, the following shows the date every time it + changes, but only shows the hour if both the hour and the date has changed:: + {% for date in days %} - {% ifchanged date.date %} {{date.date}} {% endifchanged %} + {% ifchanged date.date %} {{ date.date }} {% endifchanged %} {% ifchanged date.hour date.date %} - {{date.hour}} + {{ date.hour }} {% endifchanged %} {% endfor %} @@ -571,7 +571,7 @@ The arguments can be hard-coded strings, so the following is valid:: It is only possible to compare an argument to template variables or strings. You cannot check for equality with Python objects such as ``True`` or ``False``. If you need to test if something is true or false, use the ``if`` -and ``ifnot`` tags instead. +tag instead. ifnotequal ~~~~~~~~~~ diff --git a/docs/templates_python.txt b/docs/templates_python.txt index ae2582d7b8..7aeed935b9 100644 --- a/docs/templates_python.txt +++ b/docs/templates_python.txt @@ -321,7 +321,7 @@ Note:: def some_view(request): # ... - return render_to_response('my_template'html', + return render_to_response('my_template.html', my_data_dictionary, context_instance=RequestContext(request)) diff --git a/docs/testing.txt b/docs/testing.txt index 19eef9f071..68eff07788 100644 --- a/docs/testing.txt +++ b/docs/testing.txt @@ -10,7 +10,7 @@ used to validate that code behaves as expected. When refactoring or modifying code, tests serve as a guide to ensure that behavior hasn't changed unexpectedly as a result of the refactor. -Testing an web application is a complex task, as there are many +Testing a web application is a complex task, as there are many components of a web application that must be validated and tested. To help you test your application, Django provides a test execution framework, and range of utilities that can be used to stimulate and -- cgit v1.3