mirror of
https://git.linux-kernel.at/oliver/ivatar.git
synced 2025-11-17 13:38:03 +00:00
Add baseurl and secure base url, in order to use it in the template(s).
This commit is contained in:
@@ -4,6 +4,7 @@ Default: useful variables for the base page templates.
|
|||||||
|
|
||||||
from ipware import get_client_ip
|
from ipware import get_client_ip
|
||||||
from ivatar.settings import IVATAR_VERSION, SITE_NAME, MAX_PHOTO_SIZE
|
from ivatar.settings import IVATAR_VERSION, SITE_NAME, MAX_PHOTO_SIZE
|
||||||
|
from ivatar.settings import BASE_URL, SECURE_BASE_URL
|
||||||
|
|
||||||
def basepage(request):
|
def basepage(request):
|
||||||
'''
|
'''
|
||||||
@@ -20,4 +21,6 @@ def basepage(request):
|
|||||||
context['site_name'] = SITE_NAME
|
context['site_name'] = SITE_NAME
|
||||||
context['site_url'] = request.build_absolute_uri('/')[:-1]
|
context['site_url'] = request.build_absolute_uri('/')[:-1]
|
||||||
context['max_file_size'] = MAX_PHOTO_SIZE
|
context['max_file_size'] = MAX_PHOTO_SIZE
|
||||||
|
context['BASE_URL'] = BASE_URL
|
||||||
|
context['SECURE_BASE_URL'] = SECURE_BASE_URL
|
||||||
return context
|
return context
|
||||||
|
|||||||
Reference in New Issue
Block a user