summaryrefslogtreecommitdiff
path: root/docs/intro/tutorial01.txt
diff options
context:
space:
mode:
Diffstat (limited to 'docs/intro/tutorial01.txt')
-rw-r--r--docs/intro/tutorial01.txt50
1 files changed, 28 insertions, 22 deletions
diff --git a/docs/intro/tutorial01.txt b/docs/intro/tutorial01.txt
index afda1f28a2..c2864b8f38 100644
--- a/docs/intro/tutorial01.txt
+++ b/docs/intro/tutorial01.txt
@@ -102,7 +102,7 @@ These files are:
contents" of your Django-powered site. You can read more about URLs in
:ref:`topics-http-urls`.
-.. _more about packages: http://docs.python.org/tut/node8.html#packages
+.. _more about packages: http://docs.python.org/tutorial/modules.html#packages
The development server
----------------------
@@ -158,34 +158,40 @@ It worked!
Database setup
--------------
-Now, edit :file:`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:
+Now, edit :file:`settings.py`. It's a normal Python module with
+module-level variables representing Django settings. Change the
+following keys in the :setting:`DATABASES` ``'default'`` item to match
+your databases connection settings.
- * :setting:`DATABASE_ENGINE` -- Either 'postgresql_psycopg2', 'mysql' or
- 'sqlite3'. Other backends are :setting:`also available <DATABASE_ENGINE>`.
+ * :setting:`ENGINE` -- Either
+ ``'django.db.backends.postgresql_psycopg2'``,
+ ``'django.db.backends.mysql'`` or
+ ``'django.db.backends.sqlite3'``. Other backends are
+ :setting:`also available <ENGINE>`.
- * :setting:`DATABASE_NAME` -- The name of your database. If you're using
- SQLite, the database will be a file on your computer; in that case,
- ``DATABASE_NAME`` should be the full absolute path, including filename, of
- that file. If the file doesn't exist, it will automatically be created
- when you synchronize the database for the first time (see below).
+ * :setting:`NAME` -- The name of your database. If you're using
+ SQLite, the database will be a file on your computer; in that
+ case, :setting:`NAME` should be the full absolute path,
+ including filename, of that file. If the file doesn't exist, it
+ will automatically be created when you synchronize the database
+ for the first time (see below).
- When specifying the path, always use forward slashes, even on Windows
- (e.g. ``C:/homes/user/mysite/sqlite3.db``).
+ When specifying the path, always use forward slashes, even on
+ Windows (e.g. ``C:/homes/user/mysite/sqlite3.db``).
- * :setting:`DATABASE_USER` -- Your database username (not used for SQLite).
+ * :setting:`USER` -- Your database username (not used for SQLite).
- * :setting:`DATABASE_PASSWORD` -- Your database password (not used for
+ * :setting:`PASSWORD` -- Your database password (not used for
SQLite).
- * :setting:`DATABASE_HOST` -- The host your database is on. Leave this as an
- empty string if your database server is on the same physical machine (not
- used for SQLite).
+ * :setting:`HOST` -- The host your database is on. Leave this as
+ an empty string if your database server is on the same physical
+ machine (not used for SQLite).
-If you're new to databases, we recommend simply using SQLite (by setting
-:setting:`DATABASE_ENGINE` to ``'sqlite3'``). SQLite is included as part of
-Python 2.5 and later, so you won't need to install anything else.
+If you're new to databases, we recommend simply using SQLite (by
+setting :setting:`ENGINE` to ``'django.db.backends.sqlite3'``). SQLite
+is included as part of Python 2.5 and later, so you won't need to
+install anything else.
.. note::
@@ -361,7 +367,7 @@ Finally, note a relationship is defined, using
to a single Poll. Django supports all the common database relationships:
many-to-ones, many-to-manys and one-to-ones.
-.. _`Python path`: http://docs.python.org/tut/node8.html#SECTION008110000000000000000
+.. _`Python path`: http://docs.python.org/tutorial/modules.html#the-module-search-path
Activating models
=================