def episode(request, episode): site = RequestSite(request) podcast = podcast_by_id(episode.podcast) if not check_publisher_permission(request.user, podcast): return HttpResponseForbidden() if request.method == 'POST': form = None # EpisodeForm(request.POST, instance=e) # if form.is_valid(): # form.save() elif request.method == 'GET': form = None # EpisodeForm(instance=e) timeline_data = list(episode_listener_data(episode)) heatmap = EpisodeHeatmap(episode.podcast, episode._id, duration=episode.duration) return render(request, 'publisher/episode.html', { 'is_secure': request.is_secure(), 'domain': site.domain, 'episode': episode, 'podcast': podcast, 'form': form, 'timeline_data': timeline_data, 'heatmap': heatmap, })
def episode(request, episode): site = RequestSite(request) podcast = episode.podcast if not check_publisher_permission(request.user, podcast): return HttpResponseForbidden() if request.method == "POST": form = None # EpisodeForm(request.POST, instance=e) # if form.is_valid(): # form.save() elif request.method == "GET": form = None # EpisodeForm(instance=e) timeline_data = list(episode_listener_data(episode)) return render( request, "publisher/episode.html", { "is_secure": request.is_secure(), "domain": site.domain, "episode": episode, "podcast": podcast, "form": form, "timeline_data": timeline_data, }, )
def episode(request, episode): site = RequestSite(request) podcast = episode.podcast if not check_publisher_permission(request.user, podcast): return HttpResponseForbidden() if request.method == 'POST': form = None # EpisodeForm(request.POST, instance=e) # if form.is_valid(): # form.save() elif request.method == 'GET': form = None # EpisodeForm(instance=e) timeline_data = list(episode_listener_data(episode)) return render( request, 'publisher/episode.html', { 'is_secure': request.is_secure(), 'domain': site.domain, 'episode': episode, 'podcast': podcast, 'form': form, 'timeline_data': timeline_data, }, )