post test
authorJan Szejko <janek37@gmail.com>
Tue, 5 Jun 2018 13:27:27 +0000 (15:27 +0200)
committerJan Szejko <janek37@gmail.com>
Tue, 5 Jun 2018 13:27:27 +0000 (15:27 +0200)
src/wolnelektury/templates/post_test.html [new file with mode: 0644]
src/wolnelektury/urls.py
src/wolnelektury/views.py

diff --git a/src/wolnelektury/templates/post_test.html b/src/wolnelektury/templates/post_test.html
new file mode 100644 (file)
index 0000000..e0f7109
--- /dev/null
@@ -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 %}
index fbc458d..ee807fd 100644 (file)
@@ -89,4 +89,5 @@ urlpatterns += [
 
 urlpatterns += [
     url(r'^error-test/$', views.exception_test),
 
 urlpatterns += [
     url(r'^error-test/$', views.exception_test),
+    # url(r'^post-test/$', views.post_test),
 ]
 ]
index 6108122..2115151 100644 (file)
@@ -191,4 +191,8 @@ def exception_test(request):
     if msg:
         raise Exception('Exception test: %s' % msg)
     else:
     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/'})