From: Jan Szejko <janek37@gmail.com>
Date: Tue, 5 Jun 2018 13:27:27 +0000 (+0200)
Subject: post test
X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/0bb67240e8bc535ec703e34262487ba902c91079

post test
---

diff --git a/src/wolnelektury/templates/post_test.html b/src/wolnelektury/templates/post_test.html
new file mode 100644
index 000000000..e0f71099b
--- /dev/null
+++ b/src/wolnelektury/templates/post_test.html
@@ -0,0 +1,8 @@
+{% extends "base/base.html" %}
+
+{% block body %}
+  <form method="post" action="{{ action }}">
+    {% csrf_token %}
+    <input type="submit" value="send post"/>
+  </form>
+{% endblock body %}
diff --git a/src/wolnelektury/urls.py b/src/wolnelektury/urls.py
index fbc458d16..ee807fd2d 100644
--- a/src/wolnelektury/urls.py
+++ b/src/wolnelektury/urls.py
@@ -89,4 +89,5 @@ urlpatterns += [
 
 urlpatterns += [
     url(r'^error-test/$', views.exception_test),
+    # url(r'^post-test/$', views.post_test),
 ]
diff --git a/src/wolnelektury/views.py b/src/wolnelektury/views.py
index 6108122c7..21151510d 100644
--- a/src/wolnelektury/views.py
+++ b/src/wolnelektury/views.py
@@ -191,4 +191,8 @@ def exception_test(request):
     if msg:
         raise Exception('Exception test: %s' % msg)
     else:
-        raise Exception('Exception test')
\ No newline at end of file
+        raise Exception('Exception test')
+
+
+def post_test(request):
+    return render(request, 'post_test.html', {'action': '/api/reading/jego-zasady/complete/'})