1
0
mirror of https://github.com/django/django.git synced 2025-10-24 14:16:09 +00:00

Refs #34140 -- Corrected rst code-block and various formatting issues in docs.

This commit is contained in:
Joseph Victor Zammit
2023-01-23 21:29:05 +01:00
committed by Mariusz Felisiak
parent c67ea79aa9
commit ba755ca131
57 changed files with 443 additions and 269 deletions

View File

@@ -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: