22 lines
540 B
Python
22 lines
540 B
Python
from __future__ import annotations
|
|
|
|
from typing import Any
|
|
|
|
from django.http import HttpRequest
|
|
|
|
from apps.profiles.models import SearchProfile
|
|
|
|
|
|
def navigation_context(request: HttpRequest) -> dict[str, Any]:
|
|
context = {
|
|
"app_name": "VacatureRadar",
|
|
"app_version": "0.2.11",
|
|
}
|
|
if request.user.is_authenticated:
|
|
context["navigation_profile"] = (
|
|
SearchProfile.objects.filter(user=request.user, is_active=True)
|
|
.only("id", "name")
|
|
.first()
|
|
)
|
|
return context
|