def get_context_data(self, **kwargs): context = super(StationDetailView, self).get_context_data(**kwargs) form = LoginForm() context['form'] = form.as_table() station_id = self.request.get_full_path().split('/')[3] station = Station.objects.get(id=station_id) context['station'] = station context['songs'] = Song.objects.filter(station=station) return context
def get_context_data(self, **kwargs): context = super(PandoraDetailView, self).get_context_data(**kwargs) form = LoginForm() context['form'] = form.as_table() context['stations'] = Station.objects.all() return context