Ignore:
Timestamp:
Jun 15, 2014, 10:06:46 PM (11 years ago)
Author:
Alex Dehnert <adehnert@…>
Branches:
master
Children:
6479b5c
Parents:
2e4e1fb
git-author:
Alex Dehnert <adehnert@…> (06/15/14 21:36:47)
git-committer:
Alex Dehnert <adehnert@…> (06/15/14 22:06:46)
Message:

Django 1.6: use new {% url %} syntax

Starting in Django 1.5, the argument to {% url %} is treated as a variable,
rather than a literal. To get a literal, we need to enclose the argument in
quotes. For Django 1.4 support, we also want to do {% load url from future %}
-- probably in more places than just base.html, but we'll see.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • remit/remit_templates/vouchers/reimbursementrequest_list.html

    rf6f7aff r695d358  
    11{% extends "base.html" %}
     2{% load url from future %}
    23{% load misc %}
    34
     
    5859    <td>
    5960        <input type='checkbox' name='select' value='{{object.pk}}'{%ifin object.pk selected_ids %} checked='checked'{%endifin%}></input>
    60         <a href='{% url review_request object.pk %}'>{{ object.pk }}</a>
     61        <a href='{% url "review_request" object.pk %}'>{{ object.pk }}</a>
    6162    </td>
    6263    <td>
    63         <em><a href='{% url review_request object.pk %}'>{{ object.name }}</a></em>
     64        <em><a href='{% url "review_request" object.pk %}'>{{ object.name }}</a></em>
    6465        {% if object.documentation %}<br /><a href='{{object.documentation.backing_file.url}}'>(view docs)</a>{%endif%}
    6566    </td>
Note: See TracChangeset for help on using the changeset viewer.