mirror of
https://github.com/django/django.git
synced 2025-07-05 02:09:13 +00:00
[soc2010/query-refactor] Merged up to trunk r13425.
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2010/query-refactor@13429 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
f70c9985c2
commit
317010ed40
@ -46,7 +46,7 @@ Do I lose anything by using Python 2.4 versus newer Python versions, such as Pyt
|
|||||||
-----------------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
Not in the core framework. Currently, Django itself officially supports any
|
Not in the core framework. Currently, Django itself officially supports any
|
||||||
version of Python from 2.4 through 2.6, inclusive. However, newer versions of
|
version of Python from 2.4 through 2.7, inclusive. However, newer versions of
|
||||||
Python are often faster, have more features, and are better supported.
|
Python are often faster, have more features, and are better supported.
|
||||||
Third-party applications for use with Django are, of course, free to set their
|
Third-party applications for use with Django are, of course, free to set their
|
||||||
own version requirements.
|
own version requirements.
|
||||||
@ -56,7 +56,7 @@ versions as part of a migration which will end with Django running on Python 3
|
|||||||
(see below for details).
|
(see below for details).
|
||||||
|
|
||||||
All else being equal, we recommend that you use the latest 2.x release
|
All else being equal, we recommend that you use the latest 2.x release
|
||||||
(currently Python 2.6). This will let you take advantage of the numerous
|
(currently Python 2.7). This will let you take advantage of the numerous
|
||||||
improvements and optimizations to the Python language since version 2.4, and
|
improvements and optimizations to the Python language since version 2.4, and
|
||||||
will help ease the process of dropping support for older Python versions on
|
will help ease the process of dropping support for older Python versions on
|
||||||
the road to Python 3.
|
the road to Python 3.
|
||||||
|
@ -12,7 +12,7 @@ Install Python
|
|||||||
--------------
|
--------------
|
||||||
|
|
||||||
Being a Python Web framework, Django requires Python. It works with any Python
|
Being a Python Web framework, Django requires Python. It works with any Python
|
||||||
version from 2.4 to 2.6 (due to backwards
|
version from 2.4 to 2.7 (due to backwards
|
||||||
incompatibilities in Python 3.0, Django does not currently work with
|
incompatibilities in Python 3.0, Django does not currently work with
|
||||||
Python 3.0; see :ref:`the Django FAQ <faq-install>` for more
|
Python 3.0; see :ref:`the Django FAQ <faq-install>` for more
|
||||||
information on supported Python versions and the 3.0 transition), but we recommend installing Python 2.5 or later. If you do so, you won't need to set up a database just yet: Python 2.5 or later includes a lightweight database called SQLite_.
|
information on supported Python versions and the 3.0 transition), but we recommend installing Python 2.5 or later. If you do so, you won't need to set up a database just yet: Python 2.5 or later includes a lightweight database called SQLite_.
|
||||||
|
@ -5,6 +5,8 @@ Validators
|
|||||||
==========
|
==========
|
||||||
|
|
||||||
.. versionadded:: 1.2
|
.. versionadded:: 1.2
|
||||||
|
.. module:: django.core.validators
|
||||||
|
:synopsis: Validation utilities and base classes
|
||||||
|
|
||||||
Writing validators
|
Writing validators
|
||||||
==================
|
==================
|
||||||
|
@ -5,7 +5,7 @@ Database access optimization
|
|||||||
============================
|
============================
|
||||||
|
|
||||||
Django's database layer provides various ways to help developers get the most
|
Django's database layer provides various ways to help developers get the most
|
||||||
out of their databases. This documents gathers together links to the relevant
|
out of their databases. This document gathers together links to the relevant
|
||||||
documentation, and adds various tips, organized under an number of headings that
|
documentation, and adds various tips, organized under an number of headings that
|
||||||
outline the steps to take when attempting to optimize your database usage.
|
outline the steps to take when attempting to optimize your database usage.
|
||||||
|
|
||||||
@ -108,9 +108,8 @@ Do database work in the database rather than in Python
|
|||||||
|
|
||||||
For instance:
|
For instance:
|
||||||
|
|
||||||
* At the most basic level, use :ref:`filter and exclude <queryset-api>` to
|
* At the most basic level, use :ref:`filter and exclude <queryset-api>` to do
|
||||||
filtering in the database to avoid loading data into your Python process, only
|
filtering in the database.
|
||||||
to throw much of it away.
|
|
||||||
|
|
||||||
* Use :ref:`F() object query expressions <query-expressions>` to do filtering
|
* Use :ref:`F() object query expressions <query-expressions>` to do filtering
|
||||||
against other fields within the same model.
|
against other fields within the same model.
|
||||||
@ -245,9 +244,6 @@ methods of individual instances, which means that any custom behaviour you have
|
|||||||
added for these methods will not be executed, including anything driven from the
|
added for these methods will not be executed, including anything driven from the
|
||||||
normal database object :ref:`signals <ref-signals>`.
|
normal database object :ref:`signals <ref-signals>`.
|
||||||
|
|
||||||
Don't retrieve things you already have
|
|
||||||
======================================
|
|
||||||
|
|
||||||
Use foreign key values directly
|
Use foreign key values directly
|
||||||
-------------------------------
|
-------------------------------
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ Install Python
|
|||||||
|
|
||||||
Being a Python Web framework, Django requires Python.
|
Being a Python Web framework, Django requires Python.
|
||||||
|
|
||||||
It works with any Python version from 2.4 to 2.6 (due to backwards
|
It works with any Python version from 2.4 to 2.7 (due to backwards
|
||||||
incompatibilities in Python 3.0, Django does not currently work with
|
incompatibilities in Python 3.0, Django does not currently work with
|
||||||
Python 3.0; see :ref:`the Django FAQ <faq-install>` for more
|
Python 3.0; see :ref:`the Django FAQ <faq-install>` for more
|
||||||
information on supported Python versions and the 3.0 transition).
|
information on supported Python versions and the 3.0 transition).
|
||||||
|
@ -169,7 +169,7 @@ For example::
|
|||||||
json_serializer.serialize(queryset, ensure_ascii=False, stream=response)
|
json_serializer.serialize(queryset, ensure_ascii=False, stream=response)
|
||||||
|
|
||||||
The Django source code includes the simplejson_ module. However, if you're
|
The Django source code includes the simplejson_ module. However, if you're
|
||||||
using Python 2.6 (which includes a builtin version of the module), Django will
|
using Python 2.6 or later (which includes a builtin version of the module), Django will
|
||||||
use the builtin ``json`` module automatically. If you have a system installed
|
use the builtin ``json`` module automatically. If you have a system installed
|
||||||
version that includes the C-based speedup extension, or your system version is
|
version that includes the C-based speedup extension, or your system version is
|
||||||
more recent than the version shipped with Django (currently, 2.0.7), the
|
more recent than the version shipped with Django (currently, 2.0.7), the
|
||||||
|
Loading…
x
Reference in New Issue
Block a user