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
commit289b882a158d21bf9ab4ec7b673b4c5d47c4c078 (patch)
tree3d44ac0fbe775e07913680b94559c0e973c41b84 /templates
parent925ed4635be4de20dd95361485c91905a593d2e3 (diff)
downloadtroggle-289b882a158d21bf9ab4ec7b673b4c5d47c4c078.tar.gz
troggle-289b882a158d21bf9ab4ec7b673b4c5d47c4c078.tar.bz2
troggle-289b882a158d21bf9ab4ec7b673b4c5d47c4c078.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>