mirror of
https://github.com/django/django.git
synced 2025-08-03 10:34:04 +00:00
Fixed #20852 - Fixed incorrectly generated left quotes in docs.
Sphinx generates left single quotes for apostrophes after code markup, when right single quotes are required. The easiest way to fix this is just by inserting the unicode character for a right single quote. Instances of the problem were found by looking for ">‘" in the generated HTML.
This commit is contained in:
parent
0b771fcf29
commit
c33d1ca1d9
20 changed files with 30 additions and 30 deletions
|
@ -288,7 +288,7 @@ object. In order to do this, we need to have two different querysets:
|
|||
|
||||
``Book`` queryset for use by :class:`~django.views.generic.list.ListView`
|
||||
Since we have access to the ``Publisher`` whose books we want to list, we
|
||||
simply override ``get_queryset()`` and use the ``Publisher``'s
|
||||
simply override ``get_queryset()`` and use the ``Publisher``’s
|
||||
:ref:`reverse foreign key manager<backwards-related-objects>`.
|
||||
|
||||
``Publisher`` queryset for use in :meth:`~django.views.generic.detail.SingleObjectMixin.get_object()`
|
||||
|
|
|
@ -100,7 +100,7 @@ access ``self.model`` to get the model class to which they're attached.
|
|||
Modifying initial Manager QuerySets
|
||||
-----------------------------------
|
||||
|
||||
A ``Manager``'s base ``QuerySet`` returns all objects in the system. For
|
||||
A ``Manager``’s base ``QuerySet`` returns all objects in the system. For
|
||||
example, using this model::
|
||||
|
||||
from django.db import models
|
||||
|
@ -111,7 +111,7 @@ example, using this model::
|
|||
|
||||
...the statement ``Book.objects.all()`` will return all books in the database.
|
||||
|
||||
You can override a ``Manager``\'s base ``QuerySet`` by overriding the
|
||||
You can override a ``Manager``’s base ``QuerySet`` by overriding the
|
||||
``Manager.get_queryset()`` method. ``get_queryset()`` should return a
|
||||
``QuerySet`` with the properties you require.
|
||||
|
||||
|
@ -246,7 +246,7 @@ Creating ``Manager`` with ``QuerySet`` methods
|
|||
In lieu of the above approach which requires duplicating methods on both the
|
||||
``QuerySet`` and the ``Manager``, :meth:`QuerySet.as_manager()
|
||||
<django.db.models.query.QuerySet.as_manager>` can be used to create an instance
|
||||
of ``Manager`` with a copy of a custom ``QuerySet``'s methods::
|
||||
of ``Manager`` with a copy of a custom ``QuerySet``’s methods::
|
||||
|
||||
class Person(models.Model):
|
||||
...
|
||||
|
|
|
@ -720,7 +720,7 @@ efficient code.
|
|||
In a newly created :class:`~django.db.models.query.QuerySet`, the cache is
|
||||
empty. The first time a :class:`~django.db.models.query.QuerySet` is evaluated
|
||||
-- and, hence, a database query happens -- Django saves the query results in
|
||||
the :class:`~django.db.models.query.QuerySet`\'s cache and returns the results
|
||||
the :class:`~django.db.models.query.QuerySet`’s cache and returns the results
|
||||
that have been explicitly requested (e.g., the next element, if the
|
||||
:class:`~django.db.models.query.QuerySet` is being iterated over). Subsequent
|
||||
evaluations of the :class:`~django.db.models.query.QuerySet` reuse the cached
|
||||
|
|
|
@ -30,7 +30,7 @@ Declaring tablespaces for indexes
|
|||
---------------------------------
|
||||
|
||||
You can pass the :attr:`~django.db.models.Field.db_tablespace` option to a
|
||||
``Field`` constructor to specify an alternate tablespace for the ``Field``'s
|
||||
``Field`` constructor to specify an alternate tablespace for the ``Field``’s
|
||||
column index. If no index would be created for the column, the option is
|
||||
ignored.
|
||||
|
||||
|
|
|
@ -392,7 +392,7 @@ these security concerns do not apply to you:
|
|||
model = Author
|
||||
fields = '__all__'
|
||||
|
||||
2. Set the ``exclude`` attribute of the ``ModelForm``'s inner ``Meta`` class to
|
||||
2. Set the ``exclude`` attribute of the ``ModelForm``’s inner ``Meta`` class to
|
||||
a list of fields to be excluded from the form.
|
||||
|
||||
For example::
|
||||
|
@ -757,7 +757,7 @@ Specifying widgets to use in the form with ``widgets``
|
|||
.. versionadded:: 1.6
|
||||
|
||||
Using the ``widgets`` parameter, you can specify a dictionary of values to
|
||||
customize the ``ModelForm``'s widget class for a particular field. This
|
||||
customize the ``ModelForm``’s widget class for a particular field. This
|
||||
works the same way as the ``widgets`` dictionary on the inner ``Meta``
|
||||
class of a ``ModelForm`` works::
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue