Exemplo n.º 1
0
 def get_template_names(self):
     host = get_host(self.request)
     if host == 'labs':
         return ['pages/labs_home.html']
     else:
         return ['pages/slides_home.html']
Exemplo n.º 2
0
 def get(self, request, *args, **kwargs):
     host = get_host(request)
     if host == 'slides':
         return redirect('lectures')
     return super(HomeView, self).get(request, *args, **kwargs)