[Fixed]-Django-passwords is not working

1๐Ÿ‘

โœ…

If your code is literarily as you typed in your comment, then the issue is with your code definition. From what you write, your view definition is:

def index(request):
    return render_to_response('templateName', {'form': ResetForm})

You never instantiate the form and you new add the POST-data to the form. Change it to:

def index(request):
    if request.method == 'POST':
        form = ResetForm(data=request.POST)
    else:
        form = ResetForm()

    return render_to_response('templateName', {'form': form})

This should work :-).

Perhaps your better off using the render method for this includes a RequestContext object that handles the CSRF token.

More info on this subject: https://docs.djangoproject.com/en/1.8/topics/forms/#the-view

Leave a comment