mirror of
https://github.com/django/django.git
synced 2024-12-22 09:05:43 +00:00
Added missing backticks to function names.
This commit is contained in:
parent
ba298a32b3
commit
39ae8d740e
@ -1618,8 +1618,8 @@ one, doing so will result in an error.
|
||||
the full set of fields for the model will be significant.
|
||||
|
||||
Even if you think you are in the advanced use-case situation, **only use
|
||||
defer() when you cannot, at queryset load time, determine if you will need
|
||||
the extra fields or not**. If you are frequently loading and using a
|
||||
``defer()`` when you cannot, at queryset load time, determine if you will
|
||||
need the extra fields or not**. If you are frequently loading and using a
|
||||
particular subset of your data, the best choice you can make is to
|
||||
normalize your models and put the non-loaded data into a separate model
|
||||
(and database table). If the columns *must* stay in the one table for some
|
||||
|
@ -332,7 +332,8 @@ https://web.archive.org/web/20110718035220/http://diveintomark.org/archives/2004
|
||||
|
||||
.. class:: SyndicationFeed
|
||||
|
||||
Base class for all syndication feeds. Subclasses should provide write().
|
||||
Base class for all syndication feeds. Subclasses should provide
|
||||
``write()``.
|
||||
|
||||
.. method:: __init__(title, link, description, language=None, author_email=None, author_name=None, author_link=None, subtitle=None, categories=None, feed_url=None, feed_copyright=None, feed_guid=None, ttl=None, **kwargs)
|
||||
|
||||
|
@ -71,9 +71,9 @@ The new features and changes introduced in 0.95 include:
|
||||
URLconfs/views on their own. Previously, the framework required that a
|
||||
database be configured, regardless of whether you actually used it.
|
||||
|
||||
* It's now more explicit and natural to override save() and delete()
|
||||
methods on models, rather than needing to hook into the pre_save() and
|
||||
post_save() method hooks.
|
||||
* It's now more explicit and natural to override ``save()`` and ``delete()``
|
||||
methods on models, rather than needing to hook into the ``pre_save()`` and
|
||||
``post_save()`` method hooks.
|
||||
|
||||
* Individual pieces of the framework now can be configured without
|
||||
requiring the setting of an environment variable. This permits use of,
|
||||
|
@ -976,12 +976,12 @@ every time you change the schema.
|
||||
Additionally, like the rest of Django's old ``syncdb`` code, ``initial_data``
|
||||
has been started down the deprecation path and will be removed in Django 1.9.
|
||||
|
||||
deconstruct() and serializability
|
||||
---------------------------------
|
||||
``deconstruct()`` and serializability
|
||||
-------------------------------------
|
||||
|
||||
Django now requires all Field classes and all of their constructor arguments
|
||||
to be serializable. If you modify the constructor signature in your custom
|
||||
Field in any way, you'll need to implement a deconstruct() method;
|
||||
Field in any way, you'll need to implement a ``deconstruct()`` method;
|
||||
we've expanded the custom field documentation with :ref:`instructions
|
||||
on implementing this method <custom-field-deconstruct-method>`.
|
||||
|
||||
|
@ -169,7 +169,7 @@ Querying in the opposite direction::
|
||||
>>> Reporter.objects.filter(article__headline__startswith='This').distinct()
|
||||
<QuerySet [<Reporter: John Smith>]>
|
||||
|
||||
Counting in the opposite direction works in conjunction with distinct()::
|
||||
Counting in the opposite direction works in conjunction with ``distinct()``::
|
||||
|
||||
>>> Reporter.objects.filter(article__headline__startswith='This').count()
|
||||
3
|
||||
|
@ -165,7 +165,7 @@ fields that are omitted from the query will be loaded on demand. For example::
|
||||
|
||||
From outward appearances, this looks like the query has retrieved both
|
||||
the first name and last name. However, this example actually issued 3
|
||||
queries. Only the first names were retrieved by the raw() query -- the
|
||||
queries. Only the first names were retrieved by the ``raw()`` query -- the
|
||||
last names were both retrieved on demand when they were printed.
|
||||
|
||||
There is only one field that you can't leave out - the primary key
|
||||
|
@ -247,8 +247,8 @@ validation step, right after the form's ``clean()`` method is called.
|
||||
|
||||
.. _overriding-modelform-clean-method:
|
||||
|
||||
Overriding the clean() method
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Overriding the ``clean()`` method
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
You can override the ``clean()`` method on a model form to provide additional
|
||||
validation in the same way you can on a normal form.
|
||||
|
Loading…
Reference in New Issue
Block a user