1. Flo Ledermann
  2. openresources

Commits

Flo Ledermann  committed d696cf0 Draft

include csrf_token in comment form

  • Participants
  • Parent commits 4f418e2
  • Branches default

Comments (0)

Files changed (1)

File openresources/templates/openresources/resource.html

View file
     
     var to_add = $( new Array(
     '<div class="">' + pname,
-    '<form method="POST" action="' + url + "\">",
+    '<form method="POST" action="' + url + '">',
+    "{% csrf_token %}",
     '<ul>',  '<label for="id_comment">Kommentar:</label><textarea id="id_comment" name="comment" cols="40" rows="10"></textarea>',
     '<li><input type="submit" value="Submit Comment" /></li>',
     '</ul>', '</form>', '</div>').join(''));