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
reg_password = request.POST['pi_password']
salt = randint(1,100000)
- # get the domain url
- current_site = Site.objects.get_current()
- current_site = current_site.domain
+
+ if request.is_secure():
+ current_site = 'https://'
+ else:
+ current_site = 'http://'
+ current_site += request.META['HTTP_HOST']
email_hash = md5(str(salt)+reg_email).hexdigest()
user_request = {