Fixed some formatting in 'Customising IndexView' doc. (#4877)

* Fixed some formatting in 'Customising IndexView' doc.

* Make coverage omit docs/conf.py.
pull/4879/head
Sergey Fedoseev 2018-10-30 17:29:11 +05:00 zatwierdzone przez Matt Westcott
rodzic 29c8ad6637
commit 8f8faf3c60
2 zmienionych plików z 7 dodań i 12 usunięć

Wyświetl plik

@ -6,6 +6,7 @@ source = wagtail
omit =
*/migrations/*
docs/conf.py
[report]

Wyświetl plik

@ -25,16 +25,10 @@ on the ``ModelAdmin`` class itself.
Default value: ``('__str__',)``
Set ``list_display`` to control which fields are displayed in the IndexView
Set ``list_display`` to control which fields are displayed in the ``IndexView``
for your model.
Example
```
list_display = ('first_name', 'last_name')
```
You have three possible values that can be used in list_display:
You have three possible values that can be used in ``list_display``:
- A field of the model. For example:
@ -370,12 +364,12 @@ For example:
**Must return**: A dictionary
The `get_extra_attrs_for_row` method allows you to add html attributes to
the opening `<tr>` tag for each result, in addition to the `data-object_pk` and
`class` attributes already added by the `result_row_display` tag.
The ``get_extra_attrs_for_row`` method allows you to add html attributes to
the opening ``<tr>`` tag for each result, in addition to the ``data-object_pk`` and
``class`` attributes already added by the ``result_row_display`` template tag.
If you want to add additional CSS classes, simply provide those class names
as a string value using the `class` key, and the `odd`/`even` will be appended
as a string value using the ``'class'`` key, and the ``odd``/``even`` will be appended
to your custom class names when rendering.
For example, if you wanted to add some additional class names based on field