Change /drafts/12345/ and /idtracker/12345/ redirects to /doc/

- Legacy-Id: 1984
This commit is contained in:
Pasi Eronen 2010-02-16 20:03:36 +00:00
parent 3ea5c2140c
commit 5d386552c0
2 changed files with 2 additions and 2 deletions

View file

@ -283,7 +283,7 @@ def view_related_docs(request, slug):
def redirect_id(request, object_id):
'''Redirect from historical document ID to preferred filename url.'''
doc = get_object_or_404(InternetDraft, id_document_tag=object_id)
return HttpResponsePermanentRedirect(reverse(view_id, args=[doc.filename]))
return HttpResponsePermanentRedirect("/doc/"+doc.filename+"/")
# Wrapper around object_detail to give permalink a handle.
# The named-URLs feature in django 0.97 will eliminate the

View file

@ -176,7 +176,7 @@ def last_call(request):
def redirect_id(request, object_id):
'''Redirect from historical document ID to preferred filename url.'''
doc = get_object_or_404(InternetDraft, id_document_tag=object_id)
return HttpResponsePermanentRedirect(reverse(view_id, args=[doc.filename]))
return HttpResponsePermanentRedirect("/doc/"+doc.filename+"/")
# calling sequence similar to object_detail, but we have different
# 404 handling: if the draft exists, render a not-found template.