Skip to content

Commit

Permalink
Fix #19809 -- Don't check if docs exist in DB.
Browse files Browse the repository at this point in the history
The docs database is built from the JSON version of the docs, which
doesn't include special pages such as indexes.

This reverts commit 1af4480.

d51819e has a better and sufficient
fix.

Refs #18930.
  • Loading branch information
aaugustin committed Feb 13, 2013
1 parent c125bfd commit b359663
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions docs/views.py
Expand Up @@ -5,16 +5,15 @@
import django.views.static
from django.core import urlresolvers
from django.http import Http404
from django.shortcuts import get_object_or_404, redirect, render_to_response

from django.shortcuts import render_to_response, redirect
from django.template import RequestContext
from django.utils import simplejson

import haystack.views

from .context_processors import recent_release
from .forms import DocSearchForm
from .models import DocumentRelease, Document
from .models import DocumentRelease
from .utils import get_doc_root_or_404, get_doc_path_or_404


Expand All @@ -39,8 +38,6 @@ def document(request, lang, version, url):
except UnicodeEncodeError:
raise Http404

get_object_or_404(Document,
release__lang=lang, release__version=version, path=url)
docroot = get_doc_root_or_404(lang, version)
doc_path = get_doc_path_or_404(docroot, url)

Expand Down

0 comments on commit b359663

Please sign in to comment.