diff options
author | 2012-11-08 15:25:49 +0100 | |
---|---|---|
committer | 2012-11-08 15:25:49 +0100 | |
commit | 7f55e00ed0a8496aefae277eea1ba692d1d003c2 (patch) | |
tree | 17204d0a606b58607085202c276b1c89af7098cc /euscanwww | |
parent | euscanwww: Showing ebuild and metadata in package details page (diff) | |
download | euscan-7f55e00ed0a8496aefae277eea1ba692d1d003c2.tar.gz euscan-7f55e00ed0a8496aefae277eea1ba692d1d003c2.tar.bz2 euscan-7f55e00ed0a8496aefae277eea1ba692d1d003c2.zip |
euscanwww: raise Http404 -> return HttpResponseNotFound()
Signed-off-by: volpino <fox91@anche.no>
Diffstat (limited to 'euscanwww')
-rw-r--r-- | euscanwww/djeuscan/views.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/euscanwww/djeuscan/views.py b/euscanwww/djeuscan/views.py index 7b51c28..0247781 100644 --- a/euscanwww/djeuscan/views.py +++ b/euscanwww/djeuscan/views.py @@ -3,7 +3,7 @@ import inspect from annoying.decorators import render_to, ajax_request -from django.http import Http404, HttpResponse +from django.http import HttpResponse, HttpResponseNotFound from django.shortcuts import get_object_or_404 from django.contrib.auth.decorators import login_required from django.views.decorators.http import require_POST @@ -58,7 +58,7 @@ def category(request, category): packages = Package.objects.for_category(category, last_versions=True) if not packages: - raise Http404 + return HttpResponseNotFound() try: last_scan = \ @@ -157,7 +157,7 @@ def overlays(request): def overlay(request, overlay): packages = Package.objects.for_overlay(overlay) if not packages: - raise Http404 + return HttpResponseNotFound() try: last_scan = EuscanResult.objects.latest().datetime @@ -228,7 +228,7 @@ def package_version_metadata(request, category, package, version_tag): try: ver, rev, slot, over = versiontag_to_attrs(version_tag) except TypeError: - raise Http404 + return HttpResponseNotFound() version = get_object_or_404(Version, package=package, version=ver, revision=rev, slot=slot, overlay=over) content = "" @@ -243,7 +243,7 @@ def package_version_ebuild(request, category, package, version_tag): try: ver, rev, slot, over = versiontag_to_attrs(version_tag) except TypeError: - raise Http404 + return HttpResponseNotFound() version = get_object_or_404(Version, package=package, version=ver, revision=rev, slot=slot, overlay=over) if version.ebuild_path: @@ -397,7 +397,7 @@ def chart(request, **kwargs): elif chart == 'versions': path = charts.versions(**kwargs) else: - raise Http404 + return HttpResponseNotFound() return serve(request, path, document_root=charts.CHARTS_ROOT) |