mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Refs #34140 -- Corrected rst code-block and various formatting issues in docs.
This commit is contained in:
committed by
Mariusz Felisiak
parent
c67ea79aa9
commit
ba755ca131
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user