X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/8559c95597de98e8f6c580e97224ed3ecc9dc5c0..e390e737951ea78e783070b9729a877945daaa42:/catalogue/views.py?ds=inline diff --git a/catalogue/views.py b/catalogue/views.py index a0315a4c6..dc2e7b107 100644 --- a/catalogue/views.py +++ b/catalogue/views.py @@ -6,7 +6,7 @@ from django.core.urlresolvers import reverse from django.db.models import Q from django.contrib.auth.decorators import login_required from django.utils.datastructures import SortedDict -from django.views.decorators.http import require_POST +from django.views.decorators.http import require_GET, require_POST from catalogue import models from catalogue import forms @@ -28,7 +28,16 @@ def catalogue_redirect(request, tags=''): else: return HttpResponseRedirect(reverse('catalogue.views.main_page')) - +# +# @require_GET +# def tag_search(request): +# search_form = forms.SearchForm(request.GET) +# if search_form.is_valid(): +# query = search_form.cleaned_data['q'] +# tags = search_form.cleaned_data['tags'] +# + + def tags_starting_with(request): try: prefix = request.GET['q'] @@ -144,6 +153,7 @@ def book_sets(request, slug): return render_to_response('catalogue/book_sets.html', locals(), context_instance=RequestContext(request)) + @login_required @require_POST def new_set(request):