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
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', ''),
'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)