feat: personalize scoring and add skills radar
This commit is contained in:
+21
-1
@@ -18,7 +18,7 @@ from django.shortcuts import get_object_or_404, redirect
|
||||
from django.urls import reverse
|
||||
from django.utils.http import url_has_allowed_host_and_scheme
|
||||
from django.views.decorators.http import require_POST
|
||||
from django.views.generic import DetailView, ListView, UpdateView
|
||||
from django.views.generic import DetailView, ListView, TemplateView, UpdateView
|
||||
|
||||
from apps.profiles.models import SearchProfile
|
||||
|
||||
@@ -32,6 +32,26 @@ from .services.applications import (
|
||||
)
|
||||
from .services.feedback import record_feedback
|
||||
from .services.relevance import it_relevance_query
|
||||
from .services.skill_demand import build_skill_demand_report
|
||||
|
||||
|
||||
class SkillInsightsView(LoginRequiredMixin, TemplateView):
|
||||
template_name = "jobs/skill_insights.html"
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
context = super().get_context_data(**kwargs)
|
||||
profile = SearchProfile.objects.filter(user=self.request.user, is_active=True).first()
|
||||
context["active_profile"] = profile
|
||||
context["report"] = (
|
||||
build_skill_demand_report(
|
||||
profile,
|
||||
category=self.request.GET.get("category", "all"),
|
||||
coverage=self.request.GET.get("coverage", "all"),
|
||||
)
|
||||
if profile
|
||||
else None
|
||||
)
|
||||
return context
|
||||
|
||||
|
||||
class JobListView(LoginRequiredMixin, ListView):
|
||||
|
||||
Reference in New Issue
Block a user