diff --git a/conservancy/podjango/templates/podjango/base_podcast.html b/conservancy/podjango/templates/podjango/base_podcast.html index af06c367..c042699a 100644 --- a/conservancy/podjango/templates/podjango/base_podcast.html +++ b/conservancy/podjango/templates/podjango/base_podcast.html @@ -31,8 +31,5 @@

All oggcasts…

- - - {% endblock %} {% endcomment %} diff --git a/conservancy/podjango/urls.py b/conservancy/podjango/urls.py index 0d6896a3..b113e60a 100644 --- a/conservancy/podjango/urls.py +++ b/conservancy/podjango/urls.py @@ -50,7 +50,6 @@ urlpatterns = [ path('//', MonthArchiveView.as_view(**info_dict), name='month-archive'), path('/', YearArchiveView.as_view(**info_dict), name='year-archive'), path('all/', custom_index, dict(info_dict, paginate_by=20), name='cast'), - path('query/', query, name='query'), path('feeds/ogg/', OggCastFeed(), name='feed-ogg'), path('feeds/mp3/', Mp3CastFeed(), name='feed-mp3'), path('feeds/', view, name='feeds'), diff --git a/conservancy/podjango/views.py b/conservancy/podjango/views.py index 24ea7e78..cbd8be10 100644 --- a/conservancy/podjango/views.py +++ b/conservancy/podjango/views.py @@ -75,38 +75,3 @@ def custom_index(request, queryset, *args, **kwargs): # TODO return render(request, 'podjango/cast/cast_list.html', {'object_list': queryset}) - - -def query(request): - """Page to query the cast based on and tags - """ - - if request.GET: - d = request.GET.copy() - if 'authors' in d.getlist('all'): - d.setlist('author', []) # remove author queries - if 'tags' in d.getlist('all'): - d.setlist('tag', []) # remove tag queries - d.setlist('all', []) # remove "all" from the query string - - base_url = '/cast/' - if 'rss' in d: - base_url = '/feeds/cast/' - d.setlist('rss', []) # remove it - - query_string = d.urlencode() - - return relative_redirect(request, '%s%s%s' % (base_url, '?' if query_string else '', query_string)) - - else: - tags = CastTag.objects.all().order_by('label') - return render(request, 'podjango/cast/query.html', {'tags': tags}) - - -def relative_redirect(request, path): - from django import http - - host = http.get_host(request) - - url = "%s://%s%s" % (request.is_secure() and 'https' or 'http', host, path) - return http.HttpResponseRedirect(url)