Use {% load url from future %} in cms templates

Using https://github.com/django-future-url
This commit is contained in:
Rebecca Lovewell 2014-01-15 08:55:58 -05:00
parent b495eddc61
commit 8857e7b760
3 changed files with 13 additions and 4 deletions

View file

@ -1,5 +1,8 @@
{% extends "site_base.html" %}
{% load url from future %}
{% load bootstrap_tags %}
{% block head_title %}Upload File{% endblock %}
@ -8,7 +11,7 @@
<div class="row">
<div class="span12">
<h1>Upload File</h1>
<form method="POST" action="{% url file_create %}" enctype="multipart/form-data">
<form method="POST" action="{% url 'file_create' %}" enctype="multipart/form-data">
{% csrf_token %}
{{ form|as_bootstrap }}
<div class="form-actions">

View file

@ -1,5 +1,8 @@
{% extends "site_base.html" %}
{% load url from future %}
{% block head_title %}Uploaded Files{% endblock %}
{% block body_outer %}
@ -9,7 +12,7 @@
{% for file in files %}
<div style="margin-top: 1em;">
<form class="pull-right" action="{% url file_delete file.pk %}" method="post">
<form class="pull-right" action="{% url 'file_delete' file.pk %}" method="post">
{% csrf_token %}
<button type="submit" class="btn btn-error"><i class="icon-trash"></i> delete</button>
</form>
@ -20,7 +23,7 @@
<p>No uploaded files.</p>
{% endfor %}
<div style="margin-top: 2em">
<a class="btn btn-success" href="{% url file_create %}">
<a class="btn btn-success" href="{% url 'file_create' %}">
<i class="icon-plus icon-white"></i>
Add File
</a>

View file

@ -1,5 +1,8 @@
{% extends "site_base.html" %}
{% load url from future %}
{% load sitetree %}
{% load i18n %}
@ -12,7 +15,7 @@
{% block body %}
{% if editable %}
<div class="pull-right">
<a href="{% url cms_page_edit page.path %}" class="btn"><i class="icon-pencil icon-large"></i> Edit this page</a>
<a href="{% url 'cms_page_edit' page.path %}" class="btn"><i class="icon-pencil icon-large"></i> Edit this page</a>
</div>
{% endif %}
<h2>{{ page.title }}</h2>