Browse Source

Properly quote url template tag arguments

A version of url introduced in Django 1.3 requires the view argument to be quoted. This change
has taken effect in Django 1.5 so the code needs updating to work with it.
tags/v1.0.0
Krzysztof Klimonda 11 years ago
parent
commit
9b20671fac
5 changed files with 11 additions and 11 deletions
  1. +4
    -4
      pinry/core/templates/core/base.html
  2. +2
    -2
      pinry/core/templates/core/login.html
  3. +2
    -2
      pinry/core/templates/core/register.html
  4. +2
    -2
      pinry/pins/templates/pins/new_pin.html
  5. +1
    -1
      pinry/pins/templates/pins/templatetags/new_pin.html

+ 4
- 4
pinry/core/templates/core/base.html View File

@@ -19,17 +19,17 @@
<body> <body>
<div class="navbar navbar-fixed-top"> <div class="navbar navbar-fixed-top">
<div class="navbar-inner"> <div class="navbar-inner">
<a href="{% url core:home %}" class="brand pull-left">{{ site_name }}</a>
<a href="{% url 'core:home' %}" class="brand pull-left">{{ site_name }}</a>


<div class="tags pull-left"></div> <div class="tags pull-left"></div>


<ul class="nav pull-right"> <ul class="nav pull-right">
{% if user.is_authenticated %} {% if user.is_authenticated %}
<li><a href="#new-pin" data-toggle="modal">New Pin</a></li> <li><a href="#new-pin" data-toggle="modal">New Pin</a></li>
<li><a href="{% url core:logout %}">Logout</a></li>
<li><a href="{% url 'core:logout' %}">Logout</a></li>
{% else %} {% else %}
<li><a href="{% url core:login %}">Login</a></li>
<li><a href="{% url core:register %}">Register</a></li>
<li><a href="{% url 'core:login' %}">Login</a></li>
<li><a href="{% url 'core:register' %}">Register</a></li>
{% endif %} {% endif %}
</ul> </ul>
</div> </div>


+ 2
- 2
pinry/core/templates/core/login.html View File

@@ -10,14 +10,14 @@
<div class="row"> <div class="row">
<div id="form" class="span6 offset3"> <div id="form" class="span6 offset3">
<h1>Login</h1> <h1>Login</h1>
<form action="{% url core:login %}" method="post" class="form-horizontal">
<form action="{% url 'core:login' %}" method="post" class="form-horizontal">
{% csrf_token %} {% csrf_token %}
{% for field in form %} {% for field in form %}
{% bootstrap_field field %} {% bootstrap_field field %}
{% endfor %} {% endfor %}
<div class="form-actions"> <div class="form-actions">
<button type="submit" class="btn btn-primary">Login</button> <button type="submit" class="btn btn-primary">Login</button>
<a href="{% url core:home %}" class="btn">Cancel</a>
<a href="{% url 'core:home' %}" class="btn">Cancel</a>
</div> </div>
</form> </form>
</div> </div>


+ 2
- 2
pinry/core/templates/core/register.html View File

@@ -10,14 +10,14 @@
<div class="row"> <div class="row">
<div id="form" class="span6 offset3"> <div id="form" class="span6 offset3">
<h1>Register</h1> <h1>Register</h1>
<form action="{% url core:register %}" method="post" class="form-horizontal">
<form action="{% url 'core:register' %}" method="post" class="form-horizontal">
{% csrf_token %} {% csrf_token %}
{% for field in form %} {% for field in form %}
{% bootstrap_field field %} {% bootstrap_field field %}
{% endfor %} {% endfor %}
<div class="form-actions"> <div class="form-actions">
<button type="submit" class="btn btn-primary">Register</button> <button type="submit" class="btn btn-primary">Register</button>
<a href="{% url core:home %}" class="btn">Cancel</a>
<a href="{% url 'core:home' %}" class="btn">Cancel</a>
</div> </div>
</form> </form>
</div> </div>


+ 2
- 2
pinry/pins/templates/pins/new_pin.html View File

@@ -11,13 +11,13 @@
<div class="span6 offset3" id="form"> <div class="span6 offset3" id="form">
<h1>New Pin</h1> <h1>New Pin</h1>
{{ form.non_field_errors }} {{ form.non_field_errors }}
<form enctype="multipart/form-data" action="{% url pins:new-pin %}" method="post" class="form-horizontal">
<form enctype="multipart/form-data" action="{% url 'pins:new-pin' %}" method="post" class="form-horizontal">
{% for field in form %} {% for field in form %}
{% bootstrap_field field %} {% bootstrap_field field %}
{% endfor %} {% endfor %}
<div class="form-actions"> <div class="form-actions">
<button type="submit" class="btn btn-primary">Post</button> <button type="submit" class="btn btn-primary">Post</button>
<a href="{% url core:home %}" class="btn">Cancel</a>
<a href="{% url 'core:home' %}" class="btn">Cancel</a>
</div> </div>
</form> </form>
</div> </div>


+ 1
- 1
pinry/pins/templates/pins/templatetags/new_pin.html View File

@@ -4,7 +4,7 @@
<div class="modal-header"> <div class="modal-header">
<h3>New Pin</h3> <h3>New Pin</h3>
</div> </div>
<form enctype="multipart/form-data" action="{% url pins:new-pin %}" method="post" class="form-horizontal">
<form enctype="multipart/form-data" action="{% url 'pins:new-pin' %}" method="post" class="form-horizontal">
<div class="modal-body"> <div class="modal-body">
{% for field in form %} {% for field in form %}
{% bootstrap_field field %} {% bootstrap_field field %}


Loading…
Cancel
Save