Code

Ticket #3858: tutorial01.diff

File tutorial01.diff, 1.9 KB (added by Simon G. <dev@…>, 7 years ago)

patch implementing kashif razzaqui's changes.

Line 
1Index: docs/tutorial01.txt
2===================================================================
3--- docs/tutorial01.txt (revision 4843)
4+++ docs/tutorial01.txt (working copy)
5@@ -133,8 +133,8 @@
6 variables representing Django settings. Change these settings to match your
7 database's connection parameters:
8 
9-    * ``DATABASE_ENGINE`` -- Either 'postgresql', 'mysql' or 'sqlite3'.
10-      More coming soon.
11+    * ``DATABASE_ENGINE`` -- Either 'postgresql_psycopg2', 'mysql' or 'sqlite3'.
12+      Other backends are `also available`_.
13     * ``DATABASE_NAME`` -- The name of your database, or the full (absolute)
14       path to the database file if you're using SQLite.
15     * ``DATABASE_USER`` -- Your database username (not used for SQLite).
16@@ -143,6 +143,8 @@
17       empty string if your database server is on the same physical machine
18       (not used for SQLite).
19 
20+.. _also available: ../settings/
21+
22 .. admonition:: Note
23 
24     If you're using PostgreSQL or MySQL, make sure you've created a database by
25@@ -329,12 +331,13 @@
26     );
27     CREATE TABLE "polls_choice" (
28         "id" serial NOT NULL PRIMARY KEY,
29-        "poll_id" integer NOT NULL REFERENCES "polls_poll" ("id"),
30+        "poll_id" integer NOT NULL REFERENCES "polls_poll" ("id") DEFERRABLE INITIALLY DEFERRED,
31         "choice" varchar(200) NOT NULL,
32         "votes" integer NOT NULL
33     );
34     COMMIT;
35 
36+
37 Note the following:
38 
39     * Table names are automatically generated by combining the name of the app
40@@ -365,7 +368,7 @@
41     * ``python manage.py validate polls`` -- Checks for any errors in the
42       construction of your models.
43 
44-    * ``python manage.py sqlinitialdata polls`` -- Outputs any initial data
45+    * ``python manage.py sqlcustom polls`` -- Outputs any initial data
46       required for Django's admin framework and your models.
47 
48     * ``python manage.py sqlclear polls`` -- Outputs the necessary ``DROP