X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=portal%2Fregistrationview.py;h=a4b5fd5c013eb22dd38ba360ab29d3b4d2aeaee6;hb=8daba73d1252ef12cf9b2b4390dffcb94f80055a;hp=396d357b90ea58b9ac2d02db9b9205135b0e0283;hpb=3886c4b8a044e867f5dad3cadcc0f149717790c1;p=unfold.git diff --git a/portal/registrationview.py b/portal/registrationview.py index 396d357b..a4b5fd5c 100644 --- a/portal/registrationview.py +++ b/portal/registrationview.py @@ -6,6 +6,7 @@ from django.views.generic import View from django.template.loader import render_to_string from django.shortcuts import render from django.contrib.auth import get_user_model +from django.contrib.sites.models import Site from unfold.page import Page from unfold.loginrequired import FreeAccessView @@ -49,6 +50,10 @@ class RegistrationView (FreeAccessView, ThemeView): if method == 'POST': # The form has been submitted + + # get the domain url + current_site = Site.objects.get_current() + current_site = current_site.domain user_request = { 'first_name' : wsgi_request.POST.get('firstname', ''), @@ -56,6 +61,7 @@ class RegistrationView (FreeAccessView, ThemeView): 'authority_hrn' : wsgi_request.POST.get('authority_hrn', ''), 'email' : wsgi_request.POST.get('email', '').lower(), 'password' : wsgi_request.POST.get('password', ''), + 'current_site' : current_site } # Construct user_hrn from email (XXX Should use common code)