mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-14 06:55:08 +02:00
Add /whoami view for logged-in user
This commit is contained in:
parent
cbf39aa3c3
commit
f147f8c2ab
16 changed files with 375 additions and 167 deletions
|
@ -11,3 +11,12 @@ def language_code(request):
|
|||
TEMPLATES dict of our settings file).
|
||||
"""
|
||||
return {"LANGUAGE_CODE": settings.LANGUAGE_CODE}
|
||||
|
||||
def canonical_path(request):
|
||||
"""Add a canonical URL to the template context.
|
||||
|
||||
To make a correct "rel=canonical" link in the HTML page, we need to
|
||||
construct an absolute URL for the page, and we can't do that in the
|
||||
template itself, so we do it here and pass the information on.
|
||||
"""
|
||||
return {"CANONICAL_PATH": request.build_absolute_uri(request.path)}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue