Use {% load url from future %} in cms templates
Using https://github.com/django-future-url
This commit is contained in:
parent
b495eddc61
commit
8857e7b760
3 changed files with 13 additions and 4 deletions
|
@ -1,5 +1,8 @@
|
||||||
{% extends "site_base.html" %}
|
{% extends "site_base.html" %}
|
||||||
|
|
||||||
|
{% load url from future %}
|
||||||
|
|
||||||
|
|
||||||
{% load bootstrap_tags %}
|
{% load bootstrap_tags %}
|
||||||
|
|
||||||
{% block head_title %}Upload File{% endblock %}
|
{% block head_title %}Upload File{% endblock %}
|
||||||
|
@ -8,7 +11,7 @@
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="span12">
|
<div class="span12">
|
||||||
<h1>Upload File</h1>
|
<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 %}
|
{% csrf_token %}
|
||||||
{{ form|as_bootstrap }}
|
{{ form|as_bootstrap }}
|
||||||
<div class="form-actions">
|
<div class="form-actions">
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
{% extends "site_base.html" %}
|
{% extends "site_base.html" %}
|
||||||
|
|
||||||
|
{% load url from future %}
|
||||||
|
|
||||||
|
|
||||||
{% block head_title %}Uploaded Files{% endblock %}
|
{% block head_title %}Uploaded Files{% endblock %}
|
||||||
|
|
||||||
{% block body_outer %}
|
{% block body_outer %}
|
||||||
|
@ -9,7 +12,7 @@
|
||||||
|
|
||||||
{% for file in files %}
|
{% for file in files %}
|
||||||
<div style="margin-top: 1em;">
|
<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 %}
|
{% csrf_token %}
|
||||||
<button type="submit" class="btn btn-error"><i class="icon-trash"></i> delete</button>
|
<button type="submit" class="btn btn-error"><i class="icon-trash"></i> delete</button>
|
||||||
</form>
|
</form>
|
||||||
|
@ -20,7 +23,7 @@
|
||||||
<p>No uploaded files.</p>
|
<p>No uploaded files.</p>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
<div style="margin-top: 2em">
|
<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>
|
<i class="icon-plus icon-white"></i>
|
||||||
Add File
|
Add File
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
{% extends "site_base.html" %}
|
{% extends "site_base.html" %}
|
||||||
|
|
||||||
|
{% load url from future %}
|
||||||
|
|
||||||
|
|
||||||
{% load sitetree %}
|
{% load sitetree %}
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
|
|
||||||
|
@ -12,7 +15,7 @@
|
||||||
{% block body %}
|
{% block body %}
|
||||||
{% if editable %}
|
{% if editable %}
|
||||||
<div class="pull-right">
|
<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>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<h2>{{ page.title }}</h2>
|
<h2>{{ page.title }}</h2>
|
||||||
|
|
Loading…
Reference in a new issue