X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/53e806828568c2b4b67125e8e82191e93c95a7d9..7010b5cb6b4e4380d9e23add9c7c98431b6e3f95:/src/catalogue/views.py diff --git a/src/catalogue/views.py b/src/catalogue/views.py index 2ef0d3bf0..aeed403ab 100644 --- a/src/catalogue/views.py +++ b/src/catalogue/views.py @@ -5,7 +5,6 @@ from collections import OrderedDict import random from django.conf import settings -from django.http.response import HttpResponseForbidden from django.template.loader import render_to_string from django.shortcuts import get_object_or_404, render, redirect from django.http import HttpResponse, HttpResponseRedirect, Http404, HttpResponsePermanentRedirect @@ -28,7 +27,6 @@ from catalogue.helpers import get_top_level_related_tags from catalogue.models import Book, Collection, Tag, Fragment from catalogue.utils import split_tags from catalogue.models.tag import prefetch_relations -from wolnelektury.utils import is_crawler staff_required = user_passes_test(lambda user: user.is_staff) @@ -224,9 +222,6 @@ def tagged_object_list(request, tags, list_type): except ResponseInstead as e: return e.response - if is_crawler(request) and len(tags) > 1: - return HttpResponseForbidden('address removed from crawling. check robots.txt') - if list_type == 'gallery' and any(tag.category == 'set' for tag in tags): raise Http404