Add documentation on creating dashboard and datagrid columns.
Review Request #15063 — Created May 15, 2026 and submitted
This introduces a guide for extension authors on how to create columns
for the Dashboard and other datagrids. This walks through creating a
simple column and layering on custom rendering, linking, sorting, and
queryset augmentation, along with registration.The
DashboardColumnsHookandDataGridColumnsHookpages have been
modernized to reflect how columns are created now, and to refer to the
new guide for details on column creation.
Built the docs. Checked for any obvious build or link errors.
| Summary | ID |
|---|---|
| d80c1f7f9b3f7c0e76333008e7cd33b67e839441 |
| Description | From | Last Updated |
|---|---|---|
|
typo: in order they want -> in the order they want |
|
|
|
We need from django.utils.html import format_html in this too. |
|
|
|
This defaults to the same thing as label, so it's silly to show both being defined the same. We should … |
|
|
|
This is generic, so probably shouldn't be referring specifically to review requests. Maybe "The name of the attribute on the … |
|
|
|
Typo: extra ) at the end. |
|
|
|
Need to add from django.utils.translation import gettext_lazy as _ to these. |
|
|
|
This feels a little awkward. How about: Always use :py:func:~django.utils.html.format_html to build HTML with user-provided values, or :py:func:~django.utils.html.escape to convert … |
|
|
|
Typo: teh -> the |
|
|
|
escape should be imported from django.utils.html |
|
|
|
Need to add from django.utils.translation import gettext_lazy as _ to these. |
|
|
|
Seems like something got left off here. Could probably just do "To make the column's content a link:" |
|
|
|
Typo: define -> Define |
|
|
|
link_func is only used if self.link = True, so we need to add that attr to the class vars here. |
|
|
|
typos: ReviewRequestsDataGrid -> ReviewRequestDataGrid GroupsDataGrid -> GroupDataGrid |
|
|
|
ReviewRequestsDataGrid -> ReviewRequestDataGrid |
|
|
|
This should end in a period, not a colon. |
|
|
|
This should probably include the unused **kwargs argument for future expansion. |
|
|
|
There's a missing ) in here. |
|
|
|
We should either include render_data and augment_queryset_for_data implementations in here, or at least link back to that section. As-is this … |
|
|
|
One of these has a trailing period and one doesn't |
|
|
|
staticmethod is a builtin class, not a function. Can you check that this links correctly? If not, I suspect :py:class … |
|
|
|
Lets include the detailed_label here too, like we did in the other MilestoneColumn example. |
|
|
|
This should be grouped with the other django imports. |
|
-
-
-
-
This defaults to the same thing as
label, so it's silly to show both being defined the same. We should probably either drop it from here or make it different. -
This is generic, so probably shouldn't be referring specifically to review requests. Maybe "The name of the attribute on the object being displayed in the row"?
-
-
-
This feels a little awkward. How about:
Always use :py:func:
~django.utils.html.format_htmlto build HTML with user-provided values, or :py:func:~django.utils.html.escapeto convert plain text to safe HTML. If the content already comes from a trusted source, you can wrap it with :py:func:~django.utils.safestring.mark_safe -
-
-
-
Seems like something got left off here. Could probably just do "To make the column's content a link:"
-
-
-
-
- Change Summary:
-
- Fixed a number of typos in docs and code samples.
- Fixed some references and import.
- Reworked some wording.
- Commits:
-
Summary ID 2b867485b219527bb390f5214ae0fe1958311882 3644f41c57a1e655334132cfce84567ba3586f84
Checks run (2 succeeded)
-
-
-
-
-
We should either include
render_dataandaugment_queryset_for_dataimplementations in here, or at least link back to that section. As-is this example will create an N+1 query situation. -
-
staticmethod is a builtin class, not a function. Can you check that this links correctly? If not, I suspect
:py:classwould work. -
- Change Summary:
-
- Fixed some typos.
- Added a missing
**wkargs. - Updated an example to refer to a previously-shown function to avoid an N+1 issue.
- Improved code samples.
- Commits:
-
Summary ID 3644f41c57a1e655334132cfce84567ba3586f84 d80c1f7f9b3f7c0e76333008e7cd33b67e839441