Django Newbie Question: Activation View Being Called Twice ... 99% of the time - Invalid token error
Hi and thank you for looking at my question. When a user clicks activation link in their email, they get a token invalid error page. The user is activated and can use the site. After adding debugging I see that the activation view is being called twice. The first time it works as expected, but the second time the activation key no longer exists so there is an error. Just to make thing more complicated, it does work开发者_运维百科 once in a very blue moon. Why would this happen? How can I prevent this from happening? Thanks!
For anyone who comes upon this post:
I added a session variable when the activation is true, and then checked for it in the beginning of the function, if so redirect to the appropriate url.
This solved the problem.
精彩评论