26
26
in your :setting:`INSTALLED_APPS` list, add them.
28
28
3. Add ``django.contrib.messages.context_processors.messages`` to
29
:setting:`TEMPLATE_CONTEXT_PROCESSORS` and
30
:class:`~django.contrib.messages.middleware.MessageMiddleware` to
31
:setting:`MIDDLEWARE_CLASSES`. (These are both active by default, so
29
:setting:`TEMPLATE_CONTEXT_PROCESSORS` as well as
30
:class:`django.contrib.auth.middleware.AuthenticationMiddleware` and
31
:class:`django.contrib.messages.middleware.MessageMiddleware` to
32
:setting:`MIDDLEWARE_CLASSES`. (These are all active by default, so
32
33
you only need to do this if you've manually tweaked the settings.)
34
35
4. Determine which of your application's models should be editable in the
116
119
.. attribute:: ModelAdmin.actions_selection_counter
118
.. versionadded:: 1.2
120
Controls whether a selection counter is display next to the action dropdown.
121
Controls whether a selection counter is displayed next to the action dropdown.
121
122
By default, the admin changelist will display it
122
123
(``actions_selection_counter = True``).
171
170
``fields`` option (for more complex layout needs see the
172
171
:attr:`~ModelAdmin.fieldsets` option described in the next section). For
173
172
example, you could define a simpler version of the admin form for the
174
``django.contrib.flatpages.FlatPage`` model as follows::
173
:class:`django.contrib.flatpages.models.FlatPage` model as follows::
176
175
class FlatPageAdmin(admin.ModelAdmin):
177
176
fields = ('url', 'title', 'content')
179
178
In the above example, only the fields ``url``, ``title`` and ``content``
180
will be displayed, sequentially, in the form.
182
.. versionadded:: 1.2
184
``fields`` can contain values defined in :attr:`ModelAdmin.readonly_fields`
185
to be displayed as read-only.
179
will be displayed, sequentially, in the form. ``fields`` can contain
180
values defined in :attr:`ModelAdmin.readonly_fields` to be displayed as
183
The ``fields`` option, unlike :attr:`~ModelAdmin.list_display`, may only
184
contain names of fields on the model or the form specified by
185
:attr:`~ModelAdmin.form`. It may contain callables only if they are listed
186
in :attr:`~ModelAdmin.readonly_fields`.
187
188
.. versionadded:: 1.4
218
219
a dictionary of information about the fieldset, including a list of fields
219
220
to be displayed in it.
221
A full example, taken from the :class:`django.contrib.flatpages.FlatPage`
222
A full example, taken from the
223
:class:`django.contrib.flatpages.models.FlatPage` model::
224
225
class FlatPageAdmin(admin.ModelAdmin):
253
254
'fields': ('first_name', 'last_name', 'address', 'city', 'state'),
256
Just like with the :attr:`~ModelAdmin.fields` option, to display
257
multiple fields on the same line, wrap those fields in their own
258
tuple. In this example, the ``first_name`` and ``last_name`` fields
259
will display on the same line::
257
As with the :attr:`~ModelAdmin.fields` option, to display multiple
258
fields on the same line, wrap those fields in their own tuple. In this
259
example, the ``first_name`` and ``last_name`` fields will display on
262
263
'fields': (('first_name', 'last_name'), 'address', 'city', 'state'),
265
.. versionadded:: 1.2
267
266
``fields`` can contain values defined in
268
267
:attr:`~ModelAdmin.readonly_fields` to be displayed as read-only.
269
If you add the name of a callable to ``fields``, the same rule applies
270
as with the :attr:`~ModelAdmin.fields` option: the callable must be
271
listed in :attr:`~ModelAdmin.readonly_fields`.
271
274
A list containing extra CSS classes to apply to the fieldset.
366
369
Note that the key in the dictionary is the actual field class, *not* a
367
370
string. The value is another dictionary; these arguments will be passed to
368
:meth:`~django.forms.Field.__init__`. See :doc:`/ref/forms/api` for
371
the form field's ``__init__()`` method. See :doc:`/ref/forms/api` for
457
460
* If the string given is a method of the model, ``ModelAdmin`` or a
458
461
callable, Django will HTML-escape the output by default. If you'd
459
462
rather not escape the output of the method, give the method an
460
``allow_tags`` attribute whose value is ``True``.
463
``allow_tags`` attribute whose value is ``True``. However, to avoid an
464
XSS vulnerability, you should use :func:`~django.utils.html.format_html`
465
to escape user-provided inputs.
462
467
Here's a full example model::
469
from django.utils.html import format_html
464
471
class Person(models.Model):
465
472
first_name = models.CharField(max_length=50)
466
473
last_name = models.CharField(max_length=50)
467
474
color_code = models.CharField(max_length=6)
469
476
def colored_name(self):
470
return '<span style="color: #%s;">%s %s</span>' % (self.color_code, self.first_name, self.last_name)
477
return format_html('<span style="color: #{0};">{1} {2}</span>',
471
482
colored_name.allow_tags = True
473
484
class PersonAdmin(admin.ModelAdmin):
522
from django.utils.html import format_html
511
524
class Person(models.Model):
512
525
first_name = models.CharField(max_length=50)
513
526
color_code = models.CharField(max_length=6)
515
528
def colored_first_name(self):
516
return '<span style="color: #%s;">%s</span>' % (self.color_code, self.first_name)
529
return format_html('<span style="color: #{0};">{1}</span>',
517
533
colored_first_name.allow_tags = True
518
534
colored_first_name.admin_order_field = 'first_name'
577
593
.. image:: _images/users_changelist.png
579
``list_filter`` should be a list of elements, where each element should be
580
of one of the following types:
595
``list_filter`` should be a list or tuple of elements, where each element
596
should be of one of the following types:
582
598
* a field name, where the specified field should be either a
583
599
``BooleanField``, ``CharField``, ``DateField``, ``DateTimeField``,
586
602
class PersonAdmin(ModelAdmin):
587
603
list_filter = ('is_staff', 'company')
589
.. versionadded:: 1.3
591
605
Field names in ``list_filter`` can also span relations
592
606
using the ``__`` lookup, for example::
597
611
.. versionadded:: 1.4
599
* a class inheriting from :mod:`django.contrib.admin.SimpleListFilter`,
613
* a class inheriting from ``django.contrib.admin.SimpleListFilter``,
600
614
which you need to provide the ``title`` and ``parameter_name``
601
615
attributes to and override the ``lookups`` and ``queryset`` methods,
633
647
provided in the query string and retrievable via
636
# Compare the requested value (either '80s' or 'other')
650
# Compare the requested value (either '80s' or '90s')
637
651
# to decide how to filter the queryset.
638
652
if self.value() == '80s':
639
653
return queryset.filter(birthday__gte=date(1980, 1, 1),
686
700
* a tuple, where the first element is a field name and the second
687
701
element is a class inheriting from
688
:mod:`django.contrib.admin.FieldListFilter`, for example::
702
``django.contrib.admin.FieldListFilter``, for example::
690
704
from django.contrib.admin import BooleanFieldListFilter
759
773
.. attribute:: ModelAdmin.paginator
761
.. versionadded:: 1.3
763
775
The paginator class to be used for pagination. By default,
764
776
:class:`django.core.paginator.Paginator` is used. If the custom paginator
765
777
class doesn't have the same constructor interface as
825
837
.. attribute:: ModelAdmin.readonly_fields
827
.. versionadded:: 1.2
829
839
By default the admin shows all fields as editable. Any fields in this
830
840
option (which should be a ``list`` or ``tuple``) will display its data
831
as-is and non-editable. This option behaves nearly identical to
832
:attr:`ModelAdmin.list_display`. Usage is the same, however, when you
833
specify :attr:`ModelAdmin.fields` or :attr:`ModelAdmin.fieldsets` the
834
read-only fields must be present to be shown (they are ignored otherwise).
841
as-is and non-editable; they are also excluded from the
842
:class:`~django.forms.ModelForm` used for creating and editing. Note that
843
when specifying :attr:`ModelAdmin.fields` or :attr:`ModelAdmin.fieldsets`
844
the read-only fields must be present to be shown (they are ignored
836
847
If ``readonly_fields`` is used without defining explicit ordering through
837
848
:attr:`ModelAdmin.fields` or :attr:`ModelAdmin.fieldsets` they will be
838
849
added last after all editable fields.
851
A read-only field can not only display data from a model's field, it can
852
also display the output of a model's method or a method of the
853
``ModelAdmin`` class itself. This is very similar to the way
854
:attr:`ModelAdmin.list_display` behaves. This provides an easy way to use
855
the admin interface to provide feedback on the status of the objects being
856
edited, for example::
858
from django.utils.html import format_html_join
859
from django.utils.safestring import mark_safe
861
class PersonAdmin(ModelAdmin):
862
readonly_fields = ('address_report',)
864
def address_report(self, instance):
865
# assuming get_full_address() returns a list of strings
866
# for each line of the address and you want to separate each
867
# line by a linebreak
868
return format_html_join(
871
((line,) for line in instance.get_full_address()),
872
) or "<span class='errors'>I can't determine this address.</span>"
874
# short_description functions like a model field's verbose_name
875
address_report.short_description = "Address"
876
# in this example, we have used HTML tags in the output
877
address_report.allow_tags = True
840
879
.. attribute:: ModelAdmin.save_as
842
881
Set ``save_as`` to enable a "save as" feature on admin change forms.
953
990
.. attribute:: ModelAdmin.delete_selected_confirmation_template
955
.. versionadded:: 1.2
957
Path to a custom template, used by the :meth:`delete_selected`
958
action method for displaying a confirmation page when deleting one
959
or more objects. See the :doc:`actions
960
documentation</ref/contrib/admin/actions>`.
992
Path to a custom template, used by the ``delete_selected`` action method
993
for displaying a confirmation page when deleting one or more objects. See
994
the :doc:`actions documentation</ref/contrib/admin/actions>`.
962
996
.. attribute:: ModelAdmin.object_history_template
1041
1073
.. method:: ModelAdmin.get_readonly_fields(self, request, obj=None)
1043
.. versionadded:: 1.2
1045
1075
The ``get_readonly_fields`` method is given the ``HttpRequest`` and the
1046
1076
``obj`` being edited (or ``None`` on an add form) and is expected to return
1047
1077
a ``list`` or ``tuple`` of field names that will be displayed as read-only,
1075
1105
changelist that will be linked to the change view, as described in the
1076
1106
:attr:`ModelAdmin.list_display_links` section.
1108
.. method:: ModelAdmin.get_fieldsets(self, request, obj=None)
1110
The ``get_fieldsets`` method is given the ``HttpRequest`` and the ``obj``
1111
being edited (or ``None`` on an add form) and is expected to return a list
1112
of two-tuples, in which each two-tuple represents a ``<fieldset>`` on the
1113
admin form page, as described above in the :attr:`ModelAdmin.fieldsets` section.
1115
.. method:: ModelAdmin.get_list_filter(self, request)
1117
.. versionadded:: 1.5
1119
The ``get_list_filter`` method is given the ``HttpRequest`` and is expected
1120
to return the same kind of sequence type as for the
1121
:attr:`~ModelAdmin.list_filter` attribute.
1123
.. method:: ModelAdmin.get_inline_instances(self, request, obj=None)
1125
.. versionadded:: 1.5
1127
The ``get_inline_instances`` method is given the ``HttpRequest`` and the
1128
``obj`` being edited (or ``None`` on an add form) and is expected to return
1129
a ``list`` or ``tuple`` of :class:`~django.contrib.admin.InlineModelAdmin`
1130
objects, as described below in the :class:`~django.contrib.admin.InlineModelAdmin`
1078
1133
.. method:: ModelAdmin.get_urls(self)
1080
1135
The ``get_urls`` method on a ``ModelAdmin`` returns the URLs to be used for
1116
1171
Since this is usually not what you want, Django provides a convenience
1117
1172
wrapper to check permissions and mark the view as non-cacheable. This
1118
wrapper is :meth:`AdminSite.admin_view` (i.e.
1119
``self.admin_site.admin_view`` inside a ``ModelAdmin`` instance); use it
1173
wrapper is ``AdminSite.admin_view()`` (i.e. ``self.admin_site.admin_view``
1174
inside a ``ModelAdmin`` instance); use it like so::
1122
1176
class MyModelAdmin(admin.ModelAdmin):
1123
1177
def get_urls(self):
1138
1192
If the page is cacheable, but you still want the permission check to be
1139
1193
performed, you can pass a ``cacheable=True`` argument to
1140
:meth:`AdminSite.admin_view`::
1194
``AdminSite.admin_view()``::
1142
1196
(r'^my_view/$', self.admin_site.admin_view(self.my_view, cacheable=True))
1167
1221
inlines = [MyInline, SomeOtherInline]
1169
1223
def get_formsets(self, request, obj=None):
1170
for inline in self.get_inline_instances(request):
1224
for inline in self.get_inline_instances(request, obj):
1171
1225
# hide MyInline in the add view
1172
1226
if isinstance(inline, MyInline) and obj is None:
1225
1279
.. method:: ModelAdmin.get_changelist(self, request, **kwargs)
1227
Returns the Changelist class to be used for listing. By default,
1281
Returns the ``Changelist`` class to be used for listing. By default,
1228
1282
``django.contrib.admin.views.main.ChangeList`` is used. By inheriting this
1229
1283
class you can change the behavior of the listing.
1285
.. method:: ModelAdmin.get_changelist_form(self, request, **kwargs)
1287
Returns a :class:`~django.forms.ModelForm` class for use in the ``Formset``
1288
on the changelist page. To use a custom form, for example::
1290
class MyForm(forms.ModelForm):
1294
class MyModelAdmin(admin.ModelAdmin):
1295
def get_changelist_form(self, request, **kwargs):
1298
.. method:: ModelAdmin.get_changelist_formset(self, request, **kwargs)
1300
Returns a :ref:`ModelFormSet <model-formsets>` class for use on the
1301
changelist page if :attr:`~ModelAdmin.list_editable` is used. To use a
1302
custom formset, for example::
1304
from django.forms.models import BaseModelFormSet
1306
class MyAdminFormSet(BaseModelFormSet):
1309
class MyModelAdmin(admin.ModelAdmin):
1310
def get_changelist_formset(self, request, **kwargs):
1311
kwargs['formset'] = MyAdminFormSet
1312
return super(MyModelAdmin, self).get_changelist_formset(request, **kwargs)
1231
1314
.. method:: ModelAdmin.has_add_permission(self, request)
1233
1316
Should return ``True`` if adding an object is permitted, ``False``
1264
1347
return qs.filter(author=request.user)
1266
.. method:: ModelAdmin.message_user(request, message)
1268
Sends a message to the user. The default implementation creates a message
1269
using the :mod:`django.contrib.messages` backend. See the
1270
:ref:`custom ModelAdmin example <custom-admin-action>`.
1349
.. method:: ModelAdmin.message_user(request, message, level=messages.INFO, extra_tags='', fail_silently=False)
1351
Sends a message to the user using the :mod:`django.contrib.messages`
1352
backend. See the :ref:`custom ModelAdmin example <custom-admin-action>`.
1354
.. versionadded:: 1.5
1356
Keyword arguments allow you to change the message level, add extra CSS
1357
tags, or fail silently if the ``contrib.messages`` framework is not
1358
installed. These keyword arguments match those for
1359
:func:`django.contrib.messages.add_message`, see that function's
1360
documentation for more details. One difference is that the level may be
1361
passed as a string label in addition to integer/constant.
1272
1363
.. method:: ModelAdmin.get_paginator(queryset, per_page, orphans=0, allow_empty_first_page=True)
1274
.. versionadded:: 1.3
1276
1365
Returns an instance of the paginator to use for this view. By default,
1277
1366
instantiates an instance of :attr:`paginator`.
1339
1428
rendering. For more details, see the
1340
1429
:doc:`TemplateResponse documentation </ref/template-response>`.
1431
.. _modeladmin-media-definitions:
1342
1433
``ModelAdmin`` media definitions
1343
1434
--------------------------------
1354
1445
js = ("my_code.js",)
1356
.. versionchanged:: 1.3
1358
1447
The :doc:`staticfiles app </ref/contrib/staticfiles>` prepends
1359
1448
:setting:`STATIC_URL` (or :setting:`MEDIA_URL` if :setting:`STATIC_URL` is
1360
1449
``None``) to any media paths. The same rules apply as :ref:`regular media
1361
1450
definitions on forms <form-media-paths>`.
1363
Django admin Javascript makes use of the `jQuery`_ library. To avoid
1364
conflicts with user-supplied scripts or libraries, Django's jQuery is
1365
namespaced as ``django.jQuery``. If you want to use jQuery in your own admin
1366
JavaScript without including a second copy, you can use the ``django.jQuery``
1367
object on changelist and add/edit views.
1369
If you require the jQuery library to be in the global namespace, for example
1370
when using third-party jQuery plugins, or need a newer version of jQuery, you
1371
will have to include your own copy of jQuery.
1455
Django admin Javascript makes use of the `jQuery`_ library.
1457
To avoid conflicts with user-supplied scripts or libraries, Django's jQuery
1458
(version 1.4.2) is namespaced as ``django.jQuery``. If you want to use jQuery
1459
in your own admin JavaScript without including a second copy, you can use the
1460
``django.jQuery`` object on changelist and add/edit views.
1462
The :class:`ModelAdmin` class requires jQuery by default, so there is no need
1463
to add jQuery to your ``ModelAdmin``'s list of media resources unless you have
1464
a specifc need. For example, if you require the jQuery library to be in the
1465
global namespace (for example when using third-party jQuery plugins) or if you
1466
need a newer version of jQuery, you will have to include your own copy.
1468
Django provides both uncompressed and 'minified' versions of jQuery, as
1469
``jquery.js`` and ``jquery.min.js`` respectively.
1471
:class:`ModelAdmin` and :class:`InlineModelAdmin` have a ``media`` property
1472
that returns a list of ``Media`` objects which store paths to the JavaScript
1473
files for the forms and/or formsets. If :setting:`DEBUG` is ``True`` it will
1474
return the uncompressed versions of the various JavaScript files, including
1475
``jquery.js``; if not, it will return the 'minified' versions.
1373
1477
.. _jQuery: http://jquery.com
1448
1552
- :attr:`~InlineModelAdmin.form`
1449
1553
- :attr:`~ModelAdmin.fieldsets`
1450
1554
- :attr:`~ModelAdmin.fields`
1555
- :attr:`~ModelAdmin.formfield_overrides`
1451
1556
- :attr:`~ModelAdmin.exclude`
1452
1557
- :attr:`~ModelAdmin.filter_horizontal`
1453
1558
- :attr:`~ModelAdmin.filter_vertical`
1559
- :attr:`~ModelAdmin.ordering`
1454
1560
- :attr:`~ModelAdmin.prepopulated_fields`
1561
- :meth:`~ModelAdmin.queryset`
1455
1562
- :attr:`~ModelAdmin.radio_fields`
1563
- :attr:`~ModelAdmin.readonly_fields`
1456
1564
- :attr:`~InlineModelAdmin.raw_id_fields`
1457
1565
- :meth:`~ModelAdmin.formfield_for_foreignkey`
1458
1566
- :meth:`~ModelAdmin.formfield_for_manytomany`
1460
.. versionadded:: 1.2
1462
- :attr:`~ModelAdmin.readonly_fields`
1463
- :attr:`~ModelAdmin.formfield_overrides`
1465
.. versionadded:: 1.3
1467
- :attr:`~ModelAdmin.ordering`
1468
- :meth:`~ModelAdmin.queryset`
1470
1568
.. versionadded:: 1.4
1472
1570
- :meth:`~ModelAdmin.has_add_permission`
1494
1592
.. attribute:: InlineModelAdmin.form
1496
1594
The value for ``form`` defaults to ``ModelForm``. This is what is passed
1497
through to ``inlineformset_factory`` when creating the formset for this
1595
through to :func:`~django.forms.models.inlineformset_factory` when
1596
creating the formset for this inline.
1500
1598
.. attribute:: InlineModelAdmin.extra
1504
1602
:doc:`formsets documentation </topics/forms/formsets>` for more
1507
.. versionadded:: 1.2
1509
1605
For users with JavaScript-enabled browsers, an "Add another" link is
1510
1606
provided to enable any number of additional inlines to be added in addition
1511
1607
to those provided as a result of the ``extra`` argument.
1555
1651
Specifies whether or not inline objects can be deleted in the inline.
1556
1652
Defaults to ``True``.
1654
.. method:: InlineModelAdmin.get_formset(self, request, obj=None, **kwargs)
1656
Returns a ``BaseInlineFormSet`` class for use in admin add/change views.
1657
See the example for :class:`ModelAdmin.get_formsets`.
1559
1659
Working with a model with two or more foreign keys to the same parent model
1560
1660
---------------------------------------------------------------------------
1582
1682
Working with many-to-many models
1583
1683
--------------------------------
1585
.. versionadded:: 1.2
1587
1685
By default, admin widgets for many-to-many relations will be displayed
1588
1686
on whichever model contains the actual reference to the
1589
1687
:class:`~django.db.models.ManyToManyField`. Depending on your ``ModelAdmin``
1777
1875
necessary nor advisable to replace an entire template. It is almost always
1778
1876
better to override only the section of the template which you need to change.
1780
To continue the example above, we want to add a new link next to the ``History``
1781
tool for the ``Page`` model. After looking at ``change_form.html`` we determine
1782
that we only need to override the ``object-tools`` block. Therefore here is our
1783
new ``change_form.html`` :
1878
To continue the example above, we want to add a new link next to the
1879
``History`` tool for the ``Page`` model. After looking at ``change_form.html``
1880
we determine that we only need to override the ``object-tools-items`` block.
1881
Therefore here is our new ``change_form.html`` :
1785
1883
.. code-block:: html+django
1787
1885
{% extends "admin/change_form.html" %}
1789
{% block object-tools %}
1790
{% if change %}{% if not is_popup %}
1791
<ul class="object-tools">
1792
<li><a href="history/" class="historylink">{% trans "History" %}</a></li>
1793
<li><a href="mylink/" class="historylink">My Link</a></li>
1886
{% load i18n admin_urls %}
1887
{% block object-tools-items %}
1889
<a href="{% url opts|admin_urlname:'history' original.pk|admin_urlquote %}" class="historylink">{% trans "History" %}</a>
1892
<a href="mylink/" class="historylink">My Link</a>
1794
1894
{% if has_absolute_url %}
1795
<li><a href="../../../r/{{ content_type_id }}/{{ object_id }}/" class="viewsitelink">
1796
{% trans "View on site" %}</a>
1896
<a href="{% url 'admin:view_on_site' content_type_id original.pk %}" class="viewsitelink">{% trans "View on site" %}</a>
1800
{% endif %}{% endif %}
1803
1901
And that's it! If we placed this file in the ``templates/admin/my_app``
1804
directory, our link would appear on every model's change form.
1902
directory, our link would appear on the change form for all models within
1806
1905
Templates which may be overridden per app or model
1807
1906
--------------------------------------------------
1825
Some of the admin templates, such as ``change_list_request.html`` are used
1924
Some of the admin templates, such as ``change_list_results.html`` are used
1826
1925
to render custom inclusion tags. These may be overridden, but in such cases
1827
1926
you are probably better off creating your own version of the tag in
1828
1927
question and giving it a different name. That way you can use it
1877
1976
.. attribute:: AdminSite.login_form
1879
.. versionadded:: 1.3
1881
1978
Subclass of :class:`~django.contrib.auth.forms.AuthenticationForm` that
1882
1979
will be used by the admin site login view.
1884
1981
.. attribute:: AdminSite.logout_template
1886
.. versionadded:: 1.2
1888
1983
Path to a custom template that will be used by the admin site logout view.
1890
1985
.. attribute:: AdminSite.password_change_template
1892
.. versionadded:: 1.2
1894
1987
Path to a custom template that will be used by the admin site password
1897
1990
.. attribute:: AdminSite.password_change_done_template
1899
.. versionadded:: 1.2
1901
1992
Path to a custom template that will be used by the admin site password
1902
1993
change done view.
1912
2003
``django.contrib.admin.site`` at the URL ``/admin/`` ::
1915
from django.conf.urls import patterns, url, include
2006
from django.conf.urls import patterns, include
1916
2007
from django.contrib import admin
1918
2009
admin.autodiscover()
1928
2019
``myproject.admin.admin_site`` at the URL ``/myadmin/`` ::
1931
from django.conf.urls import patterns, url, include
2022
from django.conf.urls import patterns, include
1932
2023
from myproject.admin import admin_site
1934
2025
urlpatterns = patterns('',
1955
from django.conf.urls import patterns, url, include
2046
from django.conf.urls import patterns, include
1956
2047
from myproject.admin import basic_site, advanced_site
1958
2049
urlpatterns = patterns('',
2020
2111
The :class:`AdminSite` provides the following named URL patterns:
2022
====================== ======================== =============
2023
Page URL name Parameters
2024
====================== ======================== =============
2027
Password change ``password_change``
2028
Password change done ``password_change_done``
2029
i18n javascript ``jsi18n``
2030
Application index page ``app_list`` ``app_label``
2031
====================== ======================== =============
2113
========================= ======================== ==================================
2114
Page URL name Parameters
2115
========================= ======================== ==================================
2118
Password change ``password_change``
2119
Password change done ``password_change_done``
2120
i18n javascript ``jsi18n``
2121
Application index page ``app_list`` ``app_label``
2122
Redirect to object's page ``view_on_site`` ``content_type_id``, ``object_id``
2123
========================= ======================== ==================================
2033
2125
Each :class:`ModelAdmin` instance provides an additional set of named URLs: