You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, when rendering a row of items in IndexView, the following things happen:
In templates/modeladmin/index.html the {% result_list %} tag is called
result_list does some working out, then renders a template templates/modeladmin/includes/result_list.html
The above template cycles through the results created by result_list and calls another tag {% result_row_display %} for each row.
{% result_row_display %} renders another template (templates/modeladmin/result_row.html), which cycles through each of the column values for that row and calls another template tag {% result_row_value_display %} to render each of those (In a listing of 100 items with 5 columns each result_row_value_display would be called 500 times).
result_row_value_display renders a template (templates/modeladmin/result_row_value.html) to show the column value, and also conditionally includes another template (templates/modeladmin/includes/button.html) if buttons need to be included.
I would like to make it so that {% result_row_display %} in step 4 does everything it needs to do, and can just render everything to templates/modeladmin/result_row.html, without having to call upon more tag calls or templates.
Currently, when rendering a row of items in IndexView, the following things happen:
templates/modeladmin/index.html
the{% result_list %}
tag is calledresult_list
does some working out, then renders a templatetemplates/modeladmin/includes/result_list.html
results
created byresult_list
and calls another tag{% result_row_display %}
for each row.{% result_row_display %}
renders another template (templates/modeladmin/result_row.html
), which cycles through each of the column values for that row and calls another template tag{% result_row_value_display %}
to render each of those (In a listing of 100 items with 5 columns eachresult_row_value_display
would be called 500 times).result_row_value_display
renders a template (templates/modeladmin/result_row_value.html
) to show the column value, and also conditionally includes another template (templates/modeladmin/includes/button.html
) if buttons need to be included.I would like to make it so that
{% result_row_display %}
in step 4 does everything it needs to do, and can just render everything totemplates/modeladmin/result_row.html
, without having to call upon more tag calls or templates.I've already managed this once in another branch (https://github.com/rkhleics/wagtail/blob/modeladmin/style-tweaks/wagtail/contrib/modeladmin/templatetags/modeladmin_tags.py), but it was part of a PR that ended up going way out of scope and I cancelled in the end, because it never would have been merged.
Hopefully now, with a clearer brief, I can recreate the changes in their own PR and it'll be possible to review them on their own?
The text was updated successfully, but these errors were encountered: