This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class LandingView(TemplateView): | |
def get(self, request, *args, **kwargs): | |
self.piece = request.META["PATH_INFO"].split('/')[2] | |
self.object = Landing.objects.get(slug__exact=self.piece) | |
self.template_name = self.object.get_template_path | |
return super(LandingView, self).get(request, *args, **kwargs) | |
def get_context_data(self, **kwargs): | |
context = super().get_context_data(**kwargs) |