The bug in django registration module that I'm going to report is not actually a bug, but a failure of smoth interaction between the registration templates and the default backend.
After successful registration and email activation the template always reports
[Error: Macro 'pre' error: name 'escape' is not defined]
Even if activation was successful and the module, and the user can properly log in the next time.
The reason is because the account variable that is used in the template is not set by the backend.
[Error: Macro 'code' error: code() got an unexpected keyword argument 'lang']
You may simply ignore this fact and redirect the user to the login page where his/her next login fails if not properly activated. But there exists a more elegant solution to the problem.
The account variable has to be forwarded to the page by adding {'account':user}
[Error: Macro 'code' error: code() got an unexpected keyword argument 'lang']
Now as the activation-complete page is called via direct_to_template, we need to modify the templeta a bit. That is instead of retrieving account we have to use the variable params.account.
[Error: Macro 'code' error: code() got an unexpected keyword argument 'lang']
After accomplishing these little amendments the activation works as expected. Studying the documentation of the registration module was useful in solving this problem.
|