File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change 77from django .contrib .admin import StackedInline as BaseStackedInline
88from django .contrib .admin import TabularInline as BaseTabularInline
99from django .contrib .admin import display , helpers
10+ from django .contrib .admin .options import IS_POPUP_VAR , TO_FIELD_VAR
1011from django .contrib .admin .widgets import RelatedFieldWidgetWrapper
1112from django .db import models
1213from django .db .models import BLANK_CHOICE_DASH , Model
@@ -472,7 +473,14 @@ def changelist_view(
472473 for action in self .get_actions_row (request )
473474 ]
474475
475- extra_context .update ({"actions_list" : actions , "actions_row" : actions_row })
476+ extra_context .update (
477+ {
478+ "actions_list" : actions ,
479+ "actions_row" : actions_row ,
480+ "to_field_var" : TO_FIELD_VAR ,
481+ "is_popup_var" : IS_POPUP_VAR ,
482+ }
483+ )
476484
477485 return super ().changelist_view (request , extra_context )
478486
Original file line number Diff line number Diff line change @@ -45,6 +45,15 @@ <h3 class="border-b flex font-semibold mb-4 px-4 py-4 text-font-important-light
4545 {% if request.GET.o %}
4646 < input type ="hidden " name ="o " value ="{{ request.GET.o }} ">
4747 {% endif %}
48+
49+ {% if is_popup %}
50+ < input type ="hidden " name ="{{ is_popup_var }} " value ="1 ">
51+ {% endif %}
52+
53+ {% if to_field %}
54+ < input type ="hidden " name ="{{ to_field_var }} " value ="{{ to_field }} ">
55+ {% endif %}
56+
4857 {% endif %}
4958
5059 {% for spec in cl.filter_specs %}
You can’t perform that action at this time.
0 commit comments