diff options
| author | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2007-06-25 12:47:19 +0000 |
|---|---|---|
| committer | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2007-06-25 12:47:19 +0000 |
| commit | 0ced8b0bb211fca38669293b15316930e0d648fd (patch) | |
| tree | a6f4733859aed03765c396f843770b503c36ec90 /docs | |
| parent | f4387422f0a556fb2469500fb9d408306bead02c (diff) | |
unicode: Merged from trunk up to [5530]. Oracle backend has not been ported to
support unicode yet.
git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5531 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/authentication.txt | 4 | ||||
| -rw-r--r-- | docs/db-api.txt | 2 | ||||
| -rw-r--r-- | docs/faq.txt | 3 | ||||
| -rw-r--r-- | docs/install.txt | 31 | ||||
| -rw-r--r-- | docs/model-api.txt | 22 | ||||
| -rw-r--r-- | docs/newforms.txt | 8 | ||||
| -rw-r--r-- | docs/settings.txt | 6 | ||||
| -rw-r--r-- | docs/templates.txt | 3 | ||||
| -rw-r--r-- | docs/tutorial01.txt | 2 |
9 files changed, 53 insertions, 28 deletions
diff --git a/docs/authentication.txt b/docs/authentication.txt index 12b61db538..972ca42073 100644 --- a/docs/authentication.txt +++ b/docs/authentication.txt @@ -161,8 +161,8 @@ The ``User`` model has a custom manager that has the following helper functions: * ``make_random_password(length=10, allowed_chars='abcdefghjkmnpqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ23456789')`` Returns a random password with the given length and given string of allowed characters. (Note that the default value of ``allowed_chars`` - doesn't contain ``"I"`` or letters that look like it, to avoid user - confusion. + doesn't contain letters that can cause user confusion, including + ``1``, ``I`` and ``0``). Basic usage ----------- diff --git a/docs/db-api.txt b/docs/db-api.txt index f58dca3f3a..38510ef530 100644 --- a/docs/db-api.txt +++ b/docs/db-api.txt @@ -598,7 +598,7 @@ related ``Person`` *and* the related ``City``:: p = b.author # Doesn't hit the database. c = p.hometown # Doesn't hit the database. - sv = Book.objects.get(id=4) # No select_related() in this example. + b = Book.objects.get(id=4) # No select_related() in this example. p = b.author # Hits the database. c = p.hometown # Hits the database. diff --git a/docs/faq.txt b/docs/faq.txt index bdd8c5360e..d7d8f41146 100644 --- a/docs/faq.txt +++ b/docs/faq.txt @@ -301,7 +301,7 @@ means it can run on a variety of server platforms. If you want to use Django with a database, which is probably the case, you'll also need a database engine. PostgreSQL_ is recommended, because we're -PostgreSQL fans, and MySQL_ and `SQLite 3`_ are also supported. +PostgreSQL fans, and MySQL_, `SQLite 3`_, and Oracle_ are also supported. .. _Python: http://www.python.org/ .. _Apache 2: http://httpd.apache.org/ @@ -310,6 +310,7 @@ PostgreSQL fans, and MySQL_ and `SQLite 3`_ are also supported. .. _PostgreSQL: http://www.postgresql.org/ .. _MySQL: http://www.mysql.com/ .. _`SQLite 3`: http://www.sqlite.org/ +.. _Oracle: http://www.oracle.com/ Do I lose anything by using Python 2.3 versus newer Python versions, such as Python 2.5? ---------------------------------------------------------------------------------------- diff --git a/docs/install.txt b/docs/install.txt index 4f5a4bbe31..99aad4e52d 100644 --- a/docs/install.txt +++ b/docs/install.txt @@ -17,8 +17,10 @@ probably already have it installed. Install Apache and mod_python ============================= -If you just want to experiment with Django, skip this step. Django comes with -its own Web server for development purposes. +If you just want to experiment with Django, skip ahead to the next +section; Django includes a lightweight web server you can use for +testing, so you won't need to set up Apache until you're ready to +deploy Django in production. If you want to use Django on a production site, use Apache with `mod_python`_. mod_python is similar to mod_perl -- it embeds Python within Apache and loads @@ -62,6 +64,8 @@ installed. * If you're using SQLite, you'll need pysqlite_. Use version 2.0.3 or higher. +* If you're using Oracle, you'll need cx_Oracle_, version 4.3.1 or higher. + .. _PostgreSQL: http://www.postgresql.org/ .. _MySQL: http://www.mysql.com/ .. _Django's ticket system: http://code.djangoproject.com/report/1 @@ -71,6 +75,7 @@ installed. .. _SQLite: http://www.sqlite.org/ .. _pysqlite: http://initd.org/tracker/pysqlite .. _MySQL backend: ../databases/ +.. _cx_Oracle: http://www.python.net/crew/atuining/cx_Oracle/ Remove any old versions of Django ================================= @@ -83,23 +88,20 @@ If you installed Django using ``setup.py install``, uninstalling is as simple as deleting the ``django`` directory from your Python ``site-packages``. -If you installed Django from a Python Egg, remove the Django ``.egg`` file, +If you installed Django from a Python egg, remove the Django ``.egg`` file, and remove the reference to the egg in the file named ``easy-install.pth``. This file should also be located in your ``site-packages`` directory. .. admonition:: Where are my ``site-packages`` stored? The location of the ``site-packages`` directory depends on the operating - system, and the location in which Python was installed. However, the - following locations are common: - - * If you're using Linux: ``/usr/lib/python2.X/site-packages`` + system, and the location in which Python was installed. To find out your + system's ``site-packages`` location, execute the following:: - * If you're using Windows: ``C:\Python2.X\lib\site-packages`` + python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()" - * If you're using MacOSX: ``/Library/Python2.X/site-packages`` or - ``/Library/Frameworks/Python.framework/Versions/2.X/lib/python2.X/site-packages/`` - (in later releases). + (Note that this should be run from a shell prompt, not a Python interactive + prompt.) Install the Django code ======================= @@ -138,12 +140,15 @@ latest bug fixes and improvements, follow these instructions: 1. Make sure you have Subversion_ installed. 2. Check out the Django code into your Python ``site-packages`` directory. + On Linux / Mac OSX / Unix, do this:: svn co http://code.djangoproject.com/svn/django/trunk/ django_src - ln -s `pwd`/django_src/django /usr/lib/python2.3/site-packages/django + ln -s `pwd`/django_src/django SITE-PACKAGES-DIR/django - (In the above line, change ``python2.3`` to match your current Python version.) + (In the above line, change ``SITE-PACKAGES-DIR`` to match the location of + your system's ``site-packages`` directory, as explained in the + "Where are my ``site-packages`` stored?" section above.) On Windows, do this:: diff --git a/docs/model-api.txt b/docs/model-api.txt index bef923ec33..074e5fec82 100644 --- a/docs/model-api.txt +++ b/docs/model-api.txt @@ -492,6 +492,11 @@ has ``null=True``, that means it has two possible values for "no data": possible values for "no data;" Django convention is to use the empty string, not ``NULL``. +.. note:: + Due to database limitations, when using the Oracle backend the + ``null=True`` option will be coerced for string-based fields that can + blank, and the value ``NULL`` will be stored to denote the empty string. + ``blank`` ~~~~~~~~~ @@ -586,6 +591,13 @@ scenes. If ``True``, ``django-admin.py sqlindexes`` will output a ``CREATE INDEX`` statement for this field. +``db_tablespace`` +~~~~~~~~~~~~~~~~~ + +If this field is indexed, the name of the database tablespace to use for the +index. The default is the ``db_tablespace`` of the model, if any. If the +backend doesn't support tablespaces, this option is ignored. + ``default`` ~~~~~~~~~~~ @@ -996,6 +1008,12 @@ If your database table name is an SQL reserved word, or contains characters that aren't allowed in Python variable names -- notably, the hyphen -- that's OK. Django quotes column and table names behind the scenes. +``db_tablespace`` +----------------- + +The name of the database tablespace to use for the model. If the backend +doesn't support tablespaces, this option is ignored. + ``get_latest_by`` ----------------- @@ -1906,11 +1924,11 @@ used by the SQLite Python bindings. This is for the sake of consistency and sanity.) A final note: If all you want to do is a custom ``WHERE`` clause, you can just -just the ``where``, ``tables`` and ``params`` arguments to the standard lookup +use the ``where``, ``tables`` and ``params`` arguments to the standard lookup API. See `Other lookup options`_. .. _Python DB-API: http://www.python.org/peps/pep-0249.html -.. _Other lookup options: ../db-api/#extra-params-select-where-tables +.. _Other lookup options: ../db-api/#extra-select-none-where-none-params-none-tables-none .. _transaction handling: ../transactions/ Overriding default model methods diff --git a/docs/newforms.txt b/docs/newforms.txt index 4dc42caff2..c2e08c63b9 100644 --- a/docs/newforms.txt +++ b/docs/newforms.txt @@ -110,7 +110,7 @@ shortly. Creating ``Form`` instances --------------------------- -A ``Form`` instance is either **bound** or **unbound** to a set of data. +A ``Form`` instance is either **bound** to a set of data, or **unbound**. * If it's **bound** to a set of data, it's capable of validating that data and rendering the form as HTML with the data displayed in the HTML. @@ -1224,7 +1224,7 @@ Form validation happens when the data is cleaned. If you want to customise this process, there are various places you can change, each one serving a different purpose. Thee types of cleaning methods are run during form processing. These are normally executed when you call the ``is_valid()`` -method on a form. There are other things that can kick of cleaning and +method on a form. There are other things that can trigger cleaning and validation (accessing the ``errors`` attribute or calling ``full_clean()`` directly), but normally they won't be needed. @@ -1234,7 +1234,7 @@ the ``ValidationError`` constructor. If no ``ValidationError`` is raised, the method should return the cleaned (normalised) data as a Python object. If you detect multiple errors during a cleaning method and wish to signal all -of them to the form submittor, it is possible to pass a list of errors to the +of them to the form submitter, it is possible to pass a list of errors to the ``ValidationError`` constructor. The three types of cleaning methods are: @@ -1293,7 +1293,7 @@ dictionary. The previous paragraph means that if you are overriding ``Form.clean()``, you should iterate through ``self.cleaned_data.items()``, possibly considering the ``_errors`` dictionary attribute on the form as well. In this way, you will -already know which fields have passed thei individual validation requirements. +already know which fields have passed their individual validation requirements. A simple example ~~~~~~~~~~~~~~~~ diff --git a/docs/settings.txt b/docs/settings.txt index 4455864d54..9c9602d9ec 100644 --- a/docs/settings.txt +++ b/docs/settings.txt @@ -244,9 +244,9 @@ DATABASE_ENGINE Default: ``''`` (Empty string) -Which database backend to use. Either ``'postgresql_psycopg2'``, -``'postgresql'``, ``'mysql'``, ``'mysql_old'``, ``'sqlite3'`` or -``'ado_mssql'``. +The database backend to use. Either ``'postgresql_psycopg2'``, +``'postgresql'``, ``'mysql'``, ``'mysql_old'``, ``'sqlite3'``, +``'oracle'``, or ``'ado_mssql'``. DATABASE_HOST ------------- diff --git a/docs/templates.txt b/docs/templates.txt index 41289248c1..e3eb371bcf 100644 --- a/docs/templates.txt +++ b/docs/templates.txt @@ -1276,7 +1276,8 @@ Converts URLs in plain text into clickable links. urlizetrunc ~~~~~~~~~~~ -Converts URLs into clickable links, truncating URLs to the given character limit. +Converts URLs into clickable links, truncating URLs longer than the given +character limit. **Argument:** Length to truncate URLs to diff --git a/docs/tutorial01.txt b/docs/tutorial01.txt index d5f5fda5b2..eb530e92ff 100644 --- a/docs/tutorial01.txt +++ b/docs/tutorial01.txt @@ -10,7 +10,7 @@ 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 poll. + * An admin site that lets you add, change and delete polls. We'll assume you have `Django installed`_ already. You can tell Django is installed by running the Python interactive interpreter and typing |
