Преглед изворни кода

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 година
родитељ
комит
9b20671fac
5 измењених фајлова са 11 додато и 11 уклоњено
  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 Прегледај датотеку

@@ -19,17 +19,17 @@
<body>
<div class="navbar navbar-fixed-top">
<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>

<ul class="nav pull-right">
{% if user.is_authenticated %}
<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 %}
<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 %}
</ul>
</div>


+ 2
- 2
pinry/core/templates/core/login.html Прегледај датотеку

@@ -10,14 +10,14 @@
<div class="row">
<div id="form" class="span6 offset3">
<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 %}
{% for field in form %}
{% bootstrap_field field %}
{% endfor %}
<div class="form-actions">
<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>
</form>
</div>


+ 2
- 2
pinry/core/templates/core/register.html Прегледај датотеку

@@ -10,14 +10,14 @@
<div class="row">
<div id="form" class="span6 offset3">
<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 %}
{% for field in form %}
{% bootstrap_field field %}
{% endfor %}
<div class="form-actions">
<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>
</form>
</div>


+ 2
- 2
pinry/pins/templates/pins/new_pin.html Прегледај датотеку

@@ -11,13 +11,13 @@
<div class="span6 offset3" id="form">
<h1>New Pin</h1>
{{ 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 %}
{% bootstrap_field field %}
{% endfor %}
<div class="form-actions">
<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>
</form>
</div>


+ 1
- 1
pinry/pins/templates/pins/templatetags/new_pin.html Прегледај датотеку

@@ -4,7 +4,7 @@
<div class="modal-header">
<h3>New Pin</h3>
</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">
{% for field in form %}
{% bootstrap_field field %}


Loading…
Откажи
Сачувај