1111from company_website .models import Employees
1212from company_website .models import Testimonial
1313from company_website .view_helpers import CustomTemplateView
14+ from company_website .view_helpers import GoogleAdsMixin
1415from company_website .view_helpers import add_meta_tags_to_page_context
1516
1617
17- class MainPageView (ListView ):
18+ class MainPageView (ListView , GoogleAdsMixin ):
1819
1920 template_name = "main_page.haml"
2021 model = Testimonial
@@ -27,7 +28,7 @@ def get_context_data(self, **kwargs: Any) -> dict:
2728 return context_data
2829
2930
30- class TeamIntroductionPageView (ListView ):
31+ class TeamIntroductionPageView (ListView , GoogleAdsMixin ):
3132
3233 template_name = "team_introduction_page.haml"
3334 model = Employees
@@ -59,12 +60,17 @@ class PrivacyAndPolicyView(CustomTemplateView):
5960 page_name = PageNames .PRIVACY_AND_POLICY .name
6061
6162
62- class EstimateProjectView (FormView ):
63+ class EstimateProjectView (FormView , GoogleAdsMixin ):
6364
6465 template_name = "estimate_project.haml"
6566 form_class = ProjectToEstimateForm
6667 page_name = PageNames .ESTIMATE_PROJECT .name
6768
69+ def get_context_data (self , * , _object_list : Any = None , ** kwargs : Any ) -> dict :
70+ context_data = super ().get_context_data (** kwargs )
71+ context_data ["URL_PREFIX" ] = settings .URL_PREFIX
72+ return context_data
73+
6874 def form_valid (self , form : ProjectToEstimateForm ) -> bool :
6975 messages .success (self .request , "Profile details updated." )
7076 form .save ()
0 commit comments