Commit 6f7fb7ca authored by Kostas Papadimitriou's avatar Kostas Papadimitriou
Browse files

Configurable activation url

url to redirect on after user account activation
parent 42c10553
......@@ -322,3 +322,7 @@ PROJECT_MEMBER_LEAVE_POLICIES = getattr(settings,
{'1':'automatically accepted',
'2':'owner accepts',
'3':'closed'})
ACTIVATION_REDIRECT_URL = getattr(settings,
'ASTAKOS_ACTIVATION_REDIRECT_URL',
"/im/profile")
......@@ -101,6 +101,7 @@ from astakos.im.settings import (
COOKIE_DOMAIN, LOGOUT_NEXT,
LOGGING_LEVEL, PAGINATE_BY,
RESOURCES_PRESENTATION_DATA, PAGINATE_BY_ALL,
ACTIVATION_REDIRECT_URL,
MODERATION_ENABLED)
from astakos.im.api import get_services_dict
from astakos.im import settings as astakos_settings
......@@ -657,7 +658,9 @@ def activate(request, greeting_email_template_name='im/welcome_email.txt',
return index(request)
try:
activate_func(user, greeting_email_template_name, helpdesk_email_template_name, verify_email=True)
activate_func(user, greeting_email_template_name,
helpdesk_email_template_name, verify_email=True)
next = ACTIVATION_REDIRECT_URL or next
response = prepare_response(request, user, next, renew=True)
transaction.commit()
return response
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment