From d1e5c55258d624058a93c8cacdb1f25ae7857554 Mon Sep 17 00:00:00 2001 From: Luke Plant Date: Fri, 14 Oct 2011 00:12:01 +0000 Subject: Fixed many more ReST indentation errors, somehow accidentally missed from [16955] git-svn-id: http://code.djangoproject.com/svn/django/trunk@16983 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- docs/intro/tutorial01.txt | 128 +++++++++++++++++++++++----------------------- 1 file changed, 64 insertions(+), 64 deletions(-) (limited to 'docs/intro/tutorial01.txt') diff --git a/docs/intro/tutorial01.txt b/docs/intro/tutorial01.txt index 97743dce4a..40b00413db 100644 --- a/docs/intro/tutorial01.txt +++ b/docs/intro/tutorial01.txt @@ -9,8 +9,8 @@ poll application. It'll consist of two parts: - * A public site that lets people view polls and vote in them. - * An admin site that lets you add, change and delete polls. +* A public site that lets people view polls and vote in them. +* An admin site that lets you add, change and delete polls. We'll assume you have :doc:`Django installed ` already. You can tell Django is installed by running the Python interactive interpreter and @@ -190,30 +190,30 @@ module-level variables representing Django settings. Change the following keys in the :setting:`DATABASES` ``'default'`` item to match your databases connection settings. - * :setting:`ENGINE ` -- Either - ``'django.db.backends.postgresql_psycopg2'``, - ``'django.db.backends.mysql'`` or - ``'django.db.backends.sqlite3'``. Other backends are - :setting:`also available `. +* :setting:`ENGINE ` -- Either + ``'django.db.backends.postgresql_psycopg2'``, + ``'django.db.backends.mysql'`` or + ``'django.db.backends.sqlite3'``. Other backends are + :setting:`also available `. - * :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). +* :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:`USER` -- Your database username (not used for SQLite). +* :setting:`USER` -- Your database username (not used for SQLite). - * :setting:`PASSWORD` -- Your database password (not used for - SQLite). +* :setting:`PASSWORD` -- Your database password (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). +* :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:`ENGINE` to ``'django.db.backends.sqlite3'``). SQLite @@ -238,19 +238,19 @@ distribute them for use by others in their projects. By default, :setting:`INSTALLED_APPS` contains the following apps, all of which come with Django: - * :mod:`django.contrib.auth` -- An authentication system. +* :mod:`django.contrib.auth` -- An authentication system. - * :mod:`django.contrib.contenttypes` -- A framework for content types. +* :mod:`django.contrib.contenttypes` -- A framework for content types. - * :mod:`django.contrib.sessions` -- A session framework. +* :mod:`django.contrib.sessions` -- A session framework. - * :mod:`django.contrib.sites` -- A framework for managing multiple sites - with one Django installation. +* :mod:`django.contrib.sites` -- A framework for managing multiple sites + with one Django installation. - * :mod:`django.contrib.messages` -- A messaging framework. +* :mod:`django.contrib.messages` -- A messaging framework. - * :mod:`django.contrib.staticfiles` -- A framework for managing - static files. +* :mod:`django.contrib.staticfiles` -- A framework for managing + static files. These applications are included by default as a convenience for the common case. @@ -390,8 +390,8 @@ Activating models That small bit of model code gives Django a lot of information. With it, Django is able to: - * Create a database schema (``CREATE TABLE`` statements) for this app. - * Create a Python database-access API for accessing Poll and Choice objects. +* Create a database schema (``CREATE TABLE`` statements) for this app. +* Create a Python database-access API for accessing Poll and Choice objects. But first we need to tell our project that the ``polls`` app is installed. @@ -441,52 +441,52 @@ statements for the polls app): Note the following: - * The exact output will vary depending on the database you are using. +* 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.) +* 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.) - * Primary keys (IDs) are added automatically. (You can override this, too.) +* Primary keys (IDs) are added automatically. (You can override this, too.) - * By convention, Django appends ``"_id"`` to the foreign key field name. - Yes, you can override this, as well. +* By convention, Django appends ``"_id"`` to the foreign key field name. + Yes, you can override this, as well. - * The foreign key relationship is made explicit by a ``REFERENCES`` - statement. +* The foreign key relationship is made explicit by a ``REFERENCES`` + statement. - * It's tailored to the database you're using, so database-specific field - types such as ``auto_increment`` (MySQL), ``serial`` (PostgreSQL), or - ``integer primary key`` (SQLite) are handled for you automatically. Same - goes for quoting of field names -- e.g., using double quotes or single - quotes. The author of this tutorial runs PostgreSQL, so the example - output is in PostgreSQL syntax. +* It's tailored to the database you're using, so database-specific field + types such as ``auto_increment`` (MySQL), ``serial`` (PostgreSQL), or + ``integer primary key`` (SQLite) are handled for you automatically. Same + goes for quoting of field names -- e.g., using double quotes or single + quotes. The author of this tutorial runs PostgreSQL, so the example + output is in PostgreSQL syntax. - * The :djadmin:`sql` command doesn't actually run the SQL in your database - - it just prints it to the screen so that you can see what SQL Django thinks - is required. If you wanted to, you could copy and paste this SQL into your - database prompt. However, as we will see shortly, Django provides an - easier way of committing the SQL to the database. +* The :djadmin:`sql` command doesn't actually run the SQL in your database - + it just prints it to the screen so that you can see what SQL Django thinks + is required. If you wanted to, you could copy and paste this SQL into your + database prompt. However, as we will see shortly, Django provides an + easier way of committing the SQL to the database. If you're interested, also run the following commands: - * :djadmin:`python manage.py validate ` -- Checks for any errors - in the construction of your models. +* :djadmin:`python manage.py validate ` -- Checks for any errors + in the construction of your models. - * :djadmin:`python manage.py sqlcustom polls ` -- Outputs any - :ref:`custom SQL statements ` (such as table modifications or - constraints) that are defined for the application. +* :djadmin:`python manage.py sqlcustom polls ` -- Outputs any + :ref:`custom SQL statements ` (such as table modifications or + constraints) that are defined for the application. - * :djadmin:`python manage.py sqlclear polls ` -- Outputs the - necessary ``DROP TABLE`` statements for this app, according to which - tables already exist in your database (if any). +* :djadmin:`python manage.py sqlclear polls ` -- Outputs the + necessary ``DROP TABLE`` statements for this app, according to which + tables already exist in your database (if any). - * :djadmin:`python manage.py sqlindexes polls ` -- Outputs the - ``CREATE INDEX`` statements for this app. +* :djadmin:`python manage.py sqlindexes polls ` -- Outputs the + ``CREATE INDEX`` statements for this app. - * :djadmin:`python manage.py sqlall polls ` -- A combination of all - the SQL from the :djadmin:`sql`, :djadmin:`sqlcustom`, and - :djadmin:`sqlindexes` commands. +* :djadmin:`python manage.py sqlall polls ` -- A combination of all + the SQL from the :djadmin:`sql`, :djadmin:`sqlcustom`, and + :djadmin:`sqlindexes` commands. Looking at the output of those commands can help you understand what's actually happening under the hood. -- cgit v1.3