Ticket #16704: 16704.diff
File 16704.diff, 837 bytes (added by , 13 years ago) |
---|
-
docs/ref/contrib/csrf.txt
146 146 :ttag:`csrf_token`, you may need to ensure the client receives the cookie by 147 147 using :func:`~django.views.decorators.csrf.ensure_csrf_cookie`. 148 148 149 Other template engines 150 ---------------------- 151 152 When using a different template engine such as Cheetah, you can manually set 153 the token in your forms as follows: 154 155 .. code-block:: html 156 157 <div style="display:none"> 158 <input type="hidden" name="csrfmiddlewaretoken" value="$csrf_token"/> 159 </div> 160 161 You may use javascript similar to the :ref:`AJAX code <csrf-ajax>` above to 162 get the value of the CSRF token. 163 149 164 The decorator method 150 165 -------------------- 151 166