[Answer]-Django-userena: how to activate account for local development?

1👍

Try this. Add this lines to settings.py

LOGIN_REDIRECT_URL = '/accounts/%(username)s/'  
LOGIN_URL = '/accounts/signin/'  
LOGOUT_URL = '/accounts/signout/'  

and about email configuration, i have issues with gmail if i send a lot of mails.
So for testing purposes i have this in my settings:

EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' #printed in console

All emails will be printed in console.

EDITED:
Create new file initial_data.json in your project root with

[{
"pk": 1,
"model": "sites.site",
"fields": {
   "name": "127.0.0.1:8000",
   "domain":"127.0.0.1:8000"
   }
}]

and run syncdb of course.
This will change your example.com to 127.0.0.1:8000

👤juree

Leave a comment