From 525fab040098065248bb1d14f46454df4b8f95c9 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Sun, 5 Feb 2012 17:22:57 +0530 Subject: [PATCH] redirect selected layer --- pandora/urlalias/views.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/pandora/urlalias/views.py b/pandora/urlalias/views.py index 19ef15484..2b194d678 100644 --- a/pandora/urlalias/views.py +++ b/pandora/urlalias/views.py @@ -12,8 +12,15 @@ def padma_video(request, url): view = url[1] if len(url) > 2: layer = url[2] - alias = get_object_or_404(models.IDAlias, old=hid) - url = '/%s' % alias.new + 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) + url = '/%s' % alias.new if view: url += '/' + { 'editor': 'timeline',