• 
      

    Add documentation on creating dashboard and datagrid columns.

    Review Request #15063 — Created May 15, 2026 and updated

    Information

    Review Board
    release-8.x

    Reviewers

    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 DashboardColumnsHook and DataGridColumnsHook pages 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
    Add documentation on creating dashboard and datagrid columns.
    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 `DashboardColumnsHook` and `DataGridColumnsHook` pages have been modernized to reflect how columns are created now, and to refer to the new guide for details on column creation.
    2b867485b219527bb390f5214ae0fe1958311882
    Description From Last Updated

    typo: in order they want -> in the order they want

    david david

    We need from django.utils.html import format_html in this too.

    david david

    This defaults to the same thing as label, so it's silly to show both being defined the same. We should …

    david david

    This is generic, so probably shouldn't be referring specifically to review requests. Maybe "The name of the attribute on the …

    david david

    Typo: extra ) at the end.

    david david

    Need to add from django.utils.translation import gettext_lazy as _ to these.

    david david

    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 …

    david david

    Typo: teh -> the

    david david

    escape should be imported from django.utils.html

    david david

    Need to add from django.utils.translation import gettext_lazy as _ to these.

    david david

    Seems like something got left off here. Could probably just do "To make the column's content a link:"

    david david

    Typo: define -> Define

    david david

    link_func is only used if self.link = True, so we need to add that attr to the class vars here.

    david david

    typos: ReviewRequestsDataGrid -> ReviewRequestDataGrid GroupsDataGrid -> GroupDataGrid

    david david

    ReviewRequestsDataGrid -> ReviewRequestDataGrid

    david david
    Checks run (2 succeeded)
    flake8 passed.
    JSHint passed.
    david
    1. 
        
    2. Show all issues

      typo: in order they want -> in the order they want

    3. Show all issues

      We need from django.utils.html import format_html in this too.

    4. Show all issues

      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.

    5. Show all issues

      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"?

    6. Show all issues

      Typo: extra ) at the end.

    7. Show all issues

      Need to add from django.utils.translation import gettext_lazy as _ to these.

    8. docs/manual/extending/extensions/dashboard-columns.rst (Diff revision 1)
       
       
       
       
       
       
       
       
      Show all issues

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

    9. Show all issues

      Typo: teh -> the

    10. Show all issues

      escape should be imported from django.utils.html

    11. Show all issues

      Need to add from django.utils.translation import gettext_lazy as _ to these.

    12. Show all issues

      Seems like something got left off here. Could probably just do "To make the column's content a link:"

    13. Show all issues

      Typo: define -> Define

    14. Show all issues

      link_func is only used if self.link = True, so we need to add that attr to the class vars here.

    15. Show all issues

      typos:
      ReviewRequestsDataGrid -> ReviewRequestDataGrid
      GroupsDataGrid -> GroupDataGrid

    16. Show all issues

      ReviewRequestsDataGrid -> ReviewRequestDataGrid

    17.