We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 04237f6 commit c33f80cCopy full SHA for c33f80c
1 file changed
tom_targets/templatetags/targets_extras.py
@@ -70,14 +70,15 @@ def target_feature(target):
70
return {'target': target}
71
72
73
-@register.inclusion_tag('tom_targets/partials/target_buttons.html')
74
-def target_buttons(target):
+@register.inclusion_tag('tom_targets/partials/target_buttons.html', takes_context=True)
+def target_buttons(context, target):
75
"""
76
Displays the Update and Delete and Sharing buttons for a target.
77
78
sharing = getattr(settings, "DATA_SHARING", None)
79
- return {'target': target,
80
- 'sharing': sharing}
+ context['target'] = target
+ context['sharing'] = sharing
81
+ return context
82
83
84
@register.inclusion_tag('tom_targets/partials/target_data.html')
0 commit comments