summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorBoulder Sprinters <boulder-sprinters@djangoproject.com>2007-03-29 22:13:04 +0000
committerBoulder Sprinters <boulder-sprinters@djangoproject.com>2007-03-29 22:13:04 +0000
commit1c3fccabd049924d0de25a59d1540680e4bc0096 (patch)
treecf70bac294232338f872da2eb2f116a45ce30072 /docs
parent61c3c5bc7faef211dd7b8c8d71da46728d27d53a (diff)
boulder-oracle-sprint: Merged to [4853].
git-svn-id: http://code.djangoproject.com/svn/django/branches/boulder-oracle-sprint@4855 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs')
-rw-r--r--docs/templates.txt25
-rw-r--r--docs/testing.txt5
-rw-r--r--docs/tutorial01.txt16
3 files changed, 39 insertions, 7 deletions
diff --git a/docs/templates.txt b/docs/templates.txt
index 8ab383c461..36da8dff07 100644
--- a/docs/templates.txt
+++ b/docs/templates.txt
@@ -625,6 +625,31 @@ Load a custom template tag set.
See `Custom tag and filter libraries`_ for more information.
+lorem
+~~~~~
+
+Display random latin text useful for providing sample data in templates.
+
+Usage format: ``{% lorem [count] [method] [random] %}``
+
+ =========== =============================================================
+ Argument Description
+ =========== =============================================================
+ ``count`` A number (or variable) containing the number of paragraphs or
+ words to generate (default is 1).
+ ``method`` Either ``w`` for words, ``p`` for HTML paragraphs or ``b``
+ for plain-text paragraph blocks (default is ``b``).
+ ``random`` The word ``random``, which if given, does not use the common
+ paragraph ("Lorem ipsum dolor sit amet...") when generating
+ text.
+
+Examples:
+
+ * ``{% lorem %}`` will output the common "lorem ipsum" paragraph.
+ * ``{% lorem 3 p %}`` will output the common "lorem ipsum" paragraph
+ and two random paragraphs each wrapped in HTML ``<p>`` tags.
+ * ``{% lorem 2 w random %}`` will output two random latin words.
+
now
~~~
diff --git a/docs/testing.txt b/docs/testing.txt
index 31cea791d3..5b27ae6484 100644
--- a/docs/testing.txt
+++ b/docs/testing.txt
@@ -276,7 +276,7 @@ for testing purposes:
``status_code`` The HTTP status of the response. See RFC2616_ for a
full list of HTTP status codes.
- ``content`` The body of the response. The is the final page
+ ``content`` The body of the response. This is the final page
content as rendered by the view, or any error message
(such as the URL for a 302 redirect).
@@ -468,7 +468,8 @@ failed::
FAILED (failures=1)
-The return code for the script will indicate the number of tests that failed.
+The return code for the script is the total number of failed and erroneous
+tests. If all the tests pass, the return code is 0.
Regardless of whether the tests pass or fail, the test database is destroyed when
all the tests have been executed.
diff --git a/docs/tutorial01.txt b/docs/tutorial01.txt
index 56c5fa769e..0e857d09ca 100644
--- a/docs/tutorial01.txt
+++ b/docs/tutorial01.txt
@@ -133,8 +133,8 @@ Now, edit ``settings.py``. It's a normal Python module with module-level
variables representing Django settings. Change these settings to match your
database's connection parameters:
- * ``DATABASE_ENGINE`` -- Either 'postgresql', 'mysql' or 'sqlite3'.
- More coming soon.
+ * ``DATABASE_ENGINE`` -- Either 'postgresql_psycopg2', 'mysql' or 'sqlite3'.
+ Other backends are `also available`_.
* ``DATABASE_NAME`` -- The name of your database, or the full (absolute)
path to the database file if you're using SQLite.
* ``DATABASE_USER`` -- Your database username (not used for SQLite).
@@ -143,6 +143,8 @@ database's connection parameters:
empty string if your database server is on the same physical machine
(not used for SQLite).
+.. _also available: ../settings/
+
.. admonition:: Note
If you're using PostgreSQL or MySQL, make sure you've created a database by
@@ -319,7 +321,8 @@ Now Django knows ``mysite`` includes the ``polls`` app. Let's run another comman
python manage.py sql polls
-You should see the following (the CREATE TABLE SQL statements for the polls app)::
+You should see something similar to the following (the CREATE TABLE SQL statements
+for the polls app)::
BEGIN;
CREATE TABLE "polls_poll" (
@@ -337,6 +340,8 @@ You should see the following (the CREATE TABLE SQL statements for the polls app)
Note the following:
+ * The exact output will vary depending on the database you are using.
+
* Table names are automatically generated by combining the name of the app
(``polls``) and the lowercase name of the model -- ``poll`` and
``choice``. (You can override this behavior.)
@@ -365,8 +370,9 @@ If you're interested, also run the following commands:
* ``python manage.py validate polls`` -- Checks for any errors in the
construction of your models.
- * ``python manage.py sqlinitialdata polls`` -- Outputs any initial data
- required for Django's admin framework and your models.
+ * ``python manage.py sqlcustom polls`` -- Outputs any custom SQL statements
+ (such as table modifications or constraints) that are defined for the
+ application.
* ``python manage.py sqlclear polls`` -- Outputs the necessary ``DROP
TABLE`` statements for this app, according to which tables already exist