Django Form Is None

Viewed 45

Im on investigation Django framework and now trying to create custom procedure of resetting password.

I use this URL path

path('password_reset_confirm/<uidb64>/<token>', 
        PasswordResetConfirmView.as_view(
            template_name='user_account/reset_password/password_reset_confirm.html',
            success_url='/account/password_reset_complete/'),
        name="password_reset_confirm"),

In template i use crispy form

<form class="login-form p-4 rounded" method="post">
   {% csrf_token %}
  <h1 class="h4 mb-4 font-weight-bold">Change your password</h1>
      <p>Use the form below to change your password.</p>

       {{ form|crispy }}

 <button type="submit" value="Change">
    Submit
 </button>
</form>

So now this form do not showing in template, and if if type {{ form }} instead of {{ form.as_p }} or crispy form, that showing me None in form place.

0 Answers
Related