summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorMartin Green <martin.speleo@gmail.com>2011-05-02 03:11:17 +0100
committerMartin Green <martin.speleo@gmail.com>2011-05-02 03:11:17 +0100
commit52eb4030d0532731069cc4fe2c23c3ad4ea61a96 (patch)
treea6094d2e649e4e24521f30280b3b74d8f2b0556a /templates
parent835680f0ee7b56ac82f4eb535f999951869a295d (diff)
downloadtroggle-52eb4030d0532731069cc4fe2c23c3ad4ea61a96.tar.gz
troggle-52eb4030d0532731069cc4fe2c23c3ad4ea61a96.tar.bz2
troggle-52eb4030d0532731069cc4fe2c23c3ad4ea61a96.zip
Attempt to get csrf tag working in django 1.1-
Diffstat (limited to 'templates')
-rw-r--r--templates/csrffaker.py9
-rw-r--r--templates/newlogbookentry.html1
2 files changed, 10 insertions, 0 deletions
diff --git a/templates/csrffaker.py b/templates/csrffaker.py
new file mode 100644
index 0000000..86b1318
--- /dev/null
+++ b/templates/csrffaker.py
@@ -0,0 +1,9 @@
+import django
+if django.VERSION[0] >=1 and django.VERSION[1] > 1:
+ pass
+else:
+ from django import template
+
+ register = template.Library()
+ @register.tag
+ def csrf_token(parser, token): return ""
diff --git a/templates/newlogbookentry.html b/templates/newlogbookentry.html
index 099ae2b..4e8eda6 100644
--- a/templates/newlogbookentry.html
+++ b/templates/newlogbookentry.html
@@ -1,4 +1,5 @@
{% extends "base.html" %}
+{% load csrffaker %}
{% block title %}Logbook {{logbookentry.id}}{% endblock %}
{% block head %}
<script>