Question: Django 1.8 csrf NameError: Undefined

Question

Django 1.8 csrf NameError: Undefined

Answers 0
Added at 2017-10-04 03:10
Tags
Question

I am using Django_Mako_Plus on top of Django. And as I try to put a ${csrf_input} after my form. I am getting a NameError: Undefined. The middleware is correct. What am I doing wrong? Below is my code:

<div class="backgroundregister">
    <form id="registerform" action="/homepage/register" method="post" style="margin-top: -7vh;">${csrf_input}

        <div class="form-group" id="register-id">

            ${ form.as_table() }

            <button style="margin-top:15px; height:40px; width:300px; margin-left:3px; margin-top:30px;" type="submit" class="dissimulation">
        </div>


    </form>

</div>

I am using Django 1.8

Thank you for all your help in advance.

Answers to

Django 1.8 csrf NameError: Undefined

Source Show
◀ Wstecz