def podcast_channel_latest(request, channel): """Redirects to the latest podcast in a given channel. The channel can be specified by name, ID or object. """ match = PodcastChannel.get(channel).latest() if not match: raise Http404 return redirect(match)