mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
queryset-refactor: Merged from trunk up to [7025].
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@7029 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -57,7 +57,7 @@ worth using only if it creates a huge convenience unattainable in other ways,
|
||||
and it isn't implemented in a way that confuses developers who are trying to
|
||||
learn how to use the feature.
|
||||
|
||||
.. _`core Python principle`: http://www.python.org/doc/Humor.html#zen
|
||||
.. _`core Python principle`: http://www.python.org/dev/peps/pep-0020/
|
||||
|
||||
Consistency
|
||||
-----------
|
||||
|
||||
@@ -18,9 +18,9 @@ repository.
|
||||
FreeBSD
|
||||
=======
|
||||
|
||||
The `FreeBSD`_ ports system offers both Django 0.96 (`py-django`_) and a more
|
||||
recent, but not current, version based on Django's trunk (`py-django-devel`_).
|
||||
These are installed in the normal FreeBSD way; for Django 0.96, for example, type:
|
||||
The `FreeBSD`_ ports system offers both Django 0.96 (`py-django`_) and a more
|
||||
recent, but not current, version based on Django's trunk (`py-django-devel`_).
|
||||
These are installed in the normal FreeBSD way; for Django 0.96, for example, type:
|
||||
``cd /usr/ports/www/py-django && sudo make install clean``.
|
||||
|
||||
.. _FreeBSD: http://www.freebsd.org/
|
||||
@@ -60,22 +60,22 @@ point to find their preferred version.
|
||||
Gentoo
|
||||
------
|
||||
|
||||
A Django build is available for `Gentoo Linux`_, and is based on Django 0.96.
|
||||
The `current Gentoo build`_ can be installed by typing ``emerge django``.
|
||||
A Django package is available for `Gentoo Linux`_, and is based on Django 0.96.1.
|
||||
The `current Gentoo package`_ can be installed by typing ``emerge django``.
|
||||
|
||||
.. _Gentoo Linux: http://www.gentoo.org/
|
||||
.. _current Gentoo build: http://packages.gentoo.org/packages/?category=dev-python;name=django
|
||||
.. _current Gentoo package: http://packages.gentoo.org/package/django
|
||||
|
||||
Ubuntu
|
||||
------
|
||||
|
||||
The Debian ``python-django`` package is also available for `Ubuntu Linux`_, in
|
||||
the "universe" repository for Ubuntu 7.04 ("Feisty Fawn"). The `current Ubuntu
|
||||
package`_ is also based on Django 0.95.1 and can be installed in the same
|
||||
fashion as for Debian.
|
||||
the "universe" repository for Ubuntu 7.10 ("Gutsy Gibbon"). The `current Ubuntu
|
||||
package`_ is based on Django 0.96.1 and can be installed in the same fashion as
|
||||
for Debian.
|
||||
|
||||
.. _Ubuntu Linux: http://www.ubuntu.com/
|
||||
.. _current Ubuntu package: http://packages.ubuntu.com/feisty/python/python-django
|
||||
.. _current Ubuntu package: http://packages.ubuntu.com/gutsy/python/python-django
|
||||
|
||||
|
||||
Mac OS X
|
||||
|
||||
@@ -100,6 +100,8 @@ any code you'd like to contribute. One thing we ask is that you please use
|
||||
Unicode objects (``u'mystring'``) for strings, rather than setting the encoding
|
||||
in the file. See any of the existing flavors for examples.
|
||||
|
||||
.. _create a ticket: http://code.djangoproject.com/simpleticket
|
||||
|
||||
Argentina (``django.contrib.localflavor.ar``)
|
||||
=============================================
|
||||
|
||||
|
||||
@@ -94,7 +94,7 @@ This example is equivalent to::
|
||||
|
||||
def my_view(request):
|
||||
try:
|
||||
my_object = MyModel.object.get(pk=1)
|
||||
my_object = MyModel.objects.get(pk=1)
|
||||
except MyModel.DoesNotExist:
|
||||
raise Http404
|
||||
|
||||
@@ -136,7 +136,7 @@ This example is equivalent to::
|
||||
from django.http import Http404
|
||||
|
||||
def my_view(request):
|
||||
my_objects = MyModels.object.filter(published=True)
|
||||
my_objects = MyModel.objects.filter(published=True)
|
||||
if not my_objects:
|
||||
raise Http404
|
||||
|
||||
|
||||
@@ -953,7 +953,7 @@ Available format strings:
|
||||
U Not implemented.
|
||||
w Day of the week, digits without ``'0'`` (Sunday) to ``'6'`` (Saturday)
|
||||
leading zeros.
|
||||
W ISO-8601 week number of year, with ``1``, ``23``
|
||||
W ISO-8601 week number of year, with ``1``, ``53``
|
||||
weeks starting on Monday.
|
||||
y Year, 2 digits. ``'99'``
|
||||
Y Year, 4 digits. ``'1999'``
|
||||
|
||||
@@ -823,11 +823,11 @@ Template filter code falls into one of two situations:
|
||||
can operate in templates where auto-escaping is either on or off in
|
||||
order to make things easier for your template authors.
|
||||
|
||||
In order for you filter to know the current auto-escaping state, set the
|
||||
``needs_autoescape`` attribute to ``True`` on your function. (If you
|
||||
In order for your filter to know the current auto-escaping state, set
|
||||
the ``needs_autoescape`` attribute to ``True`` on your function. (If you
|
||||
don't specify this attribute, it defaults to ``False``). This attribute
|
||||
tells Django that your filter function wants to be passed an extra
|
||||
keyword argument, called ``autoescape``, that is ``True`` is
|
||||
keyword argument, called ``autoescape``, that is ``True`` if
|
||||
auto-escaping is in effect and ``False`` otherwise.
|
||||
|
||||
For example, let's write a filter that emphasizes the first character of
|
||||
|
||||
Reference in New Issue
Block a user