django-tables2: make it compatible with dj-tables2>=1.21 (fixes #22946)
Since version 1.21 django-tables2 does not pass the surrounding context in the table template anymore, it's only available through table.context.
This commit is contained in:
parent
48b598000f
commit
3650d9d2c2
|
@ -40,7 +40,7 @@
|
|||
{% endwith %}
|
||||
<td class="action-column" rowspan={{ row.record.description|yesno:"2,1" }}>
|
||||
{% block action-column %}
|
||||
{% if include_edit_link %}
|
||||
{% if table.context.include_edit_link or include_edit_link %}<!-- dj11 compatibility -->
|
||||
<a class="icon-edit" rel="popup" href="{% url 'edit' pk=row.record.pk %}"></a>
|
||||
{% endif %}
|
||||
{% if row.record.deletable_by_user %}
|
||||
|
|
Loading…
Reference in New Issue