# -*- coding: utf-8 -*- from django.http import HttpResponse from models import Service from functions.custom_views import ExpoListView from django.views.generic import ListView, FormView, TemplateView from haystack.query import EmptySearchQuerySet from django.shortcuts import get_object_or_404 import json from functions.search_forms import CompanySearchForm class ServiceView(TemplateView): def get_template_names(self): url = self.kwargs.get('url') service = get_object_or_404(Service, url=url) return service.template