mirror of
https://github.com/django/django.git
synced 2025-07-24 05:36:15 +00:00
Refs #34140 -- Corrected rst code-block and various formatting issues in docs.
This commit is contained in:
parent
c67ea79aa9
commit
ba755ca131
57 changed files with 443 additions and 269 deletions
|
@ -722,6 +722,8 @@ subclass::
|
|||
like::
|
||||
|
||||
@admin.display(ordering='-first_name')
|
||||
def colored_first_name(self):
|
||||
...
|
||||
|
||||
The ``ordering`` argument supports query lookups to sort by values on
|
||||
related models. This example includes an "author first name" column in
|
||||
|
@ -752,7 +754,8 @@ subclass::
|
|||
def full_name(self):
|
||||
return self.first_name + ' ' + self.last_name
|
||||
|
||||
* Elements of ``list_display`` can also be properties::
|
||||
* Elements of ``list_display`` can also be properties
|
||||
::
|
||||
|
||||
class Person(models.Model):
|
||||
first_name = models.CharField(max_length=50)
|
||||
|
@ -2993,9 +2996,9 @@ returns a site instance.
|
|||
:caption: ``myproject/settings.py``
|
||||
|
||||
INSTALLED_APPS = [
|
||||
...
|
||||
# ...
|
||||
'myproject.apps.MyAdminConfig', # replaces 'django.contrib.admin'
|
||||
...
|
||||
# ...
|
||||
]
|
||||
|
||||
.. _multiple-admin-sites:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue