Refactor URL handling to use BASE_URL across the application and add base_url context processor
All checks were successful
Deploy to Server / deploy (push) Successful in 22s
All checks were successful
Deploy to Server / deploy (push) Successful in 22s
This commit is contained in:
parent
999ab368e2
commit
d4fd35769d
11 changed files with 250 additions and 167 deletions
|
|
@ -5,6 +5,8 @@ from typing import Any
|
|||
|
||||
from django.shortcuts import render
|
||||
|
||||
from core.base_url import build_absolute_uri
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from django.http import HttpRequest
|
||||
from django.http import HttpResponse
|
||||
|
|
@ -136,7 +138,7 @@ def index(request: HttpRequest) -> HttpResponse:
|
|||
"@type": "ItemList",
|
||||
"name": PAGE_TITLE,
|
||||
"description": PAGE_DESCRIPTION,
|
||||
"url": request.build_absolute_uri(),
|
||||
"url": build_absolute_uri(request=request),
|
||||
"itemListElement": list_items,
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue