I am haviing issues with the django-registration module. When a user tries to register, the activation link that he receives in his email is not correct. I mean, for the link to work, I have to manually add my app’s name right after the domain name.
Let me explain this with an example:
This is the main’s page url (note the “HELLOPROJECT”):
http://127.0.0.1:8000/HELLOPROJECT/index
This is the registration url (note the “HELLOPROJECT”):
http://127.0.0.1:8000/HELLOPROJECT/accounts/register/
And this is the activation url sent in the email (note there is no “HELLOPROJECT”):
http://127.0.0.1:8000/accounts/activate/3a97ec229308b0112cb6e1ef16f8ab32df667b9c/
If I click the above link, an error occurs. I have to manually add the “HELLOPROJECT” for the link to work properly and register the user.
So, why does this happen? How can I solve it?
The activation email template includes
Firstly make sure you have your copy of templates for registration correct. Then make sure your
SITE_IDinsettings.pymatches thesiteyou created. Thedjangoproject.comsite is probably default and has id 1. If you edited the name of it to match your site, the id will remain same, if you add a new one find the new id and set yourSITE_IDto that.site