software6/django-userena — comment on commit 884a70454bdda943f66a1498c64133125db80468
File:  line 0
By wunki:

First off, good quality pull request. Thank you.

> The problem is that "site.domain" can only be a hostname [..]

When you go into the admin and then into "Sites". You can change the domain of your application to: ``localhost:8000``. This will create the URI in the e-mails with a specific domain _and_ port. Doesn't this make this commit obsolete? Or am I missing something?

> Furthermore "protocol" is determined by the Django Userena setting "USERENA_USE_HTTPS".
> This means that the developer must take additional (and unecessary) steps to update settings.py to switch between "http" and "https".

It's normal to have multiple settings files. At least one for local development and one for production environment. According to the environment you are in, load in a different settings file.

Finally, I understand that you moved the logic of sending an e-mail to the views because you need the ``request`` to create the URI. This is something I tried to avoid while building userena. I only kept the logic for templates in the views and all the rest in the models and managers. This way, the package supplies it's users with a better API. For instance, I can create a new user from a signal now by only calling ``create_user``. Your pull requests doesn't give me access to the logic for sending a correct e-mail since I don't create an activation URI.

Could you let me know if just changing the "domain" inside "Sites" isn't the functionality you tried to achieve?