* Redirect /help/state/draft/* to /doc/help/state/draft-* * Adjust document state index to use /doc/help/state for URLs * Move all state help to /doc. Fixes #3802 * Move state index redirect into urls file.
17 lines
577 B
Python
17 lines
577 B
Python
# Copyright The IETF Trust 2007, All Rights Reserved
|
|
|
|
import debug # pyflakes:ignore
|
|
|
|
from ietf.name.models import StreamName
|
|
from django.shortcuts import redirect
|
|
|
|
# This is just a redirect to the new URL under /doc; can probably go away eventually.
|
|
|
|
def state(request, doc, type=None):
|
|
if type:
|
|
streams = [ s.slug for s in StreamName.objects.all() ]
|
|
if type in streams:
|
|
type = "stream-%s" % type
|
|
slug = "%s-%s" % (doc,type) if type else doc
|
|
return redirect('/doc/help/state/%s' % slug, permanent = True)
|
|
|