Invalid token in django

during a simple test for password_reset classes in django, after that a user go to forget password page and give his/her email a token get sent to his/her email but at the process of checking the given token by django in apropriate page the {% if validlink %} always being false. and i dont know why