I'm getting url reverse errors and think this line is to blame.
{% if has_change_permission %}
<a href="{% url 'opts|admin_urlname:changelist' %}">
{{ opts.verbose_name_plural|capfirst }}</a>
{% else %}{
{ opts.verbose_name_plural|capfirst }}
{% endif %}
Am I corect in placing the entire filter within single quotes or do I need a double quote around the changelist argument?
You shouldn't have any quotes since you're referencing a context variable and not providing a string value. The argument is still a string though so the correct line is <a href="{% url opts|admin_urlname:'changelist' %}">
.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments