redirect selected layer

This commit is contained in:
j 2012-02-05 17:22:57 +05:30
parent 5d6f439da9
commit 525fab0400

View file

@ -12,6 +12,13 @@ def padma_video(request, url):
view = url[1] view = url[1]
if len(url) > 2: if len(url) > 2:
layer = url[2] layer = url[2]
elif view.startswith('L'):
layer = view
view = None
if layer:
alias = get_object_or_404(models.LayerAlias, old=layer)
url = '/%s' % alias.new
else:
alias = get_object_or_404(models.IDAlias, old=hid) alias = get_object_or_404(models.IDAlias, old=hid)
url = '/%s' % alias.new url = '/%s' % alias.new
if view: if view: