for the moment this is for the password change url used in the auth dropdown, and a better login page, but this might become other stuff eventually too. the signup page exists and is linked to, even if i don't have a great reason for this to exist bunch of templates added now to support the intentional and unintentional stuff
15 lines
455 B
Python
15 lines
455 B
Python
"""Site processors to add additional template tags and whatnot."""
|
|
|
|
from django.contrib.sites.shortcuts import get_current_site
|
|
from django.utils.functional import SimpleLazyObject
|
|
|
|
|
|
def site(request):
|
|
site = SimpleLazyObject(lambda: get_current_site(request))
|
|
protocol = 'https' if request.is_secure() else 'http'
|
|
|
|
return {
|
|
'site': site,
|
|
'site_root': SimpleLazyObject(lambda: "{0}://{1}".format(protocol, site.domain)),
|
|
}
|