comparison accounts/forms.py @ 991:4aadaf3bc234

Added SITE_SCHEME setting. Configure site scheme to be either http or https based on SITE_SCHEME setting. Updated code to use it.
author Brian Neal <bgneal@gmail.com>
date Sun, 01 Nov 2015 15:56:05 -0600
parents be233ba7ca31
children
comparison
equal deleted inserted replaced
990:81b96f3c9e59 991:4aadaf3bc234
203 203
204 # Send the confirmation email 204 # Send the confirmation email
205 site = Site.objects.get_current() 205 site = Site.objects.get_current()
206 admin_email = settings.DEFAULT_FROM_EMAIL 206 admin_email = settings.DEFAULT_FROM_EMAIL
207 207
208 activation_link = 'http://%s%s' % ( 208 activation_link = '%s://%s%s' % (
209 settings.SITE_SCHEME,
209 site.domain, 210 site.domain,
210 reverse('accounts-register_confirm', 211 reverse('accounts-register_confirm',
211 kwargs={'username': pending_user.username, 212 kwargs={'username': pending_user.username,
212 'key': pending_user.key})) 213 'key': pending_user.key}))
213 214