mirror of
https://github.com/django/django.git
synced 2025-08-04 19:08:28 +00:00
Fixed #19516 - Fixed remaining broken links.
Added -n to sphinx builds to catch issues going forward.
This commit is contained in:
parent
3f890f8dc7
commit
9b5f64cc6e
83 changed files with 727 additions and 611 deletions
|
@ -170,7 +170,7 @@ subclass::
|
|||
``fields`` option (for more complex layout needs see the
|
||||
:attr:`~ModelAdmin.fieldsets` option described in the next section). For
|
||||
example, you could define a simpler version of the admin form for the
|
||||
``django.contrib.flatpages.FlatPage`` model as follows::
|
||||
:class:`django.contrib.flatpages.models.FlatPage` model as follows::
|
||||
|
||||
class FlatPageAdmin(admin.ModelAdmin):
|
||||
fields = ('url', 'title', 'content')
|
||||
|
@ -212,8 +212,8 @@ subclass::
|
|||
a dictionary of information about the fieldset, including a list of fields
|
||||
to be displayed in it.
|
||||
|
||||
A full example, taken from the :class:`django.contrib.flatpages.FlatPage`
|
||||
model::
|
||||
A full example, taken from the
|
||||
:class:`django.contrib.flatpages.models.FlatPage` model::
|
||||
|
||||
class FlatPageAdmin(admin.ModelAdmin):
|
||||
fieldsets = (
|
||||
|
@ -357,7 +357,7 @@ subclass::
|
|||
|
||||
Note that the key in the dictionary is the actual field class, *not* a
|
||||
string. The value is another dictionary; these arguments will be passed to
|
||||
:meth:`~django.forms.Field.__init__`. See :doc:`/ref/forms/api` for
|
||||
the form field's ``__init__()`` method. See :doc:`/ref/forms/api` for
|
||||
details.
|
||||
|
||||
.. warning::
|
||||
|
@ -584,7 +584,7 @@ subclass::
|
|||
class PersonAdmin(UserAdmin):
|
||||
list_filter = ('company__name',)
|
||||
|
||||
* a class inheriting from :mod:`django.contrib.admin.SimpleListFilter`,
|
||||
* a class inheriting from ``django.contrib.admin.SimpleListFilter``,
|
||||
which you need to provide the ``title`` and ``parameter_name``
|
||||
attributes to and override the ``lookups`` and ``queryset`` methods,
|
||||
e.g.::
|
||||
|
@ -671,7 +671,7 @@ subclass::
|
|||
|
||||
* a tuple, where the first element is a field name and the second
|
||||
element is a class inheriting from
|
||||
:mod:`django.contrib.admin.FieldListFilter`, for example::
|
||||
``django.contrib.admin.FieldListFilter``, for example::
|
||||
|
||||
from django.contrib.admin import BooleanFieldListFilter
|
||||
|
||||
|
@ -943,10 +943,9 @@ templates used by the :class:`ModelAdmin` views:
|
|||
|
||||
.. attribute:: ModelAdmin.delete_selected_confirmation_template
|
||||
|
||||
Path to a custom template, used by the :meth:`delete_selected`
|
||||
action method for displaying a confirmation page when deleting one
|
||||
or more objects. See the :doc:`actions
|
||||
documentation</ref/contrib/admin/actions>`.
|
||||
Path to a custom template, used by the ``delete_selected`` action method
|
||||
for displaying a confirmation page when deleting one or more objects. See
|
||||
the :doc:`actions documentation</ref/contrib/admin/actions>`.
|
||||
|
||||
.. attribute:: ModelAdmin.object_history_template
|
||||
|
||||
|
@ -1108,9 +1107,8 @@ templates used by the :class:`ModelAdmin` views:
|
|||
|
||||
Since this is usually not what you want, Django provides a convenience
|
||||
wrapper to check permissions and mark the view as non-cacheable. This
|
||||
wrapper is :meth:`AdminSite.admin_view` (i.e.
|
||||
``self.admin_site.admin_view`` inside a ``ModelAdmin`` instance); use it
|
||||
like so::
|
||||
wrapper is ``AdminSite.admin_view()`` (i.e. ``self.admin_site.admin_view``
|
||||
inside a ``ModelAdmin`` instance); use it like so::
|
||||
|
||||
class MyModelAdmin(admin.ModelAdmin):
|
||||
def get_urls(self):
|
||||
|
@ -1130,7 +1128,7 @@ templates used by the :class:`ModelAdmin` views:
|
|||
|
||||
If the page is cacheable, but you still want the permission check to be
|
||||
performed, you can pass a ``cacheable=True`` argument to
|
||||
:meth:`AdminSite.admin_view`::
|
||||
``AdminSite.admin_view()``::
|
||||
|
||||
(r'^my_view/$', self.admin_site.admin_view(self.my_view, cacheable=True))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue