0001-manager-access-url_name-through-table-object-31222.patch
src/authentic2/manager/templates/authentic2/manager/table.html | ||
---|---|---|
24 | 24 |
{% if popup_edit %} |
25 | 25 |
rel="popup" |
26 | 26 |
{% endif %} |
27 |
{% if url_name %} |
|
28 |
data-url="{% url url_name pk=row.record.pk %}" |
|
27 |
{% if table.context.url_name %}
|
|
28 |
data-url="{% url table.context.url_name pk=row.record.pk %}"
|
|
29 | 29 |
{% else %} |
30 | 30 |
data-url="{{ row.record.pk }}/" |
31 | 31 |
{% endif %} |
tests/test_manager.py | ||
---|---|---|
319 | 319 |
q = response.pyquery.remove_namespaces() |
320 | 320 |
assert len(q('table tbody tr')) == 1 |
321 | 321 |
assert q('table tbody tr').text() == u'simple role' |
322 |
assert q('table tbody tr').attr('data-url') == '/manage/roles/%s/' % simple_role.pk |
|
322 | 323 | |
323 | 324 |
form.set('search-internals', True) |
324 | 325 |
response = form.submit() |
325 |
- |