repos
/ status-django master

status-django

mirror archived upstream

Self-hostable uptime monitor and status page on Django: HTTP checks, Lighthouse audits, SEO crawls, and email and Discord alerts.

djangodockerhandcodedpythonself-hostedsqlitestatus-pageuptime-monitoringvite

319 B · 16 lines · Python Raw History
 1from django.conf import settings
 2
 3
 4def canonical(request):
 5    """
 6    Gets the canonical URL for the current request.
 7    """
 8    return {'canonical': request.build_absolute_uri(request.path)}
 9
10
11def base_url(request):
12    """
13    Provides the BASE_URL from settings.
14    """
15    return {'BASE_URL': settings.BASE_URL}