provide default for permanent attribute in redirect view before Django 1.9 hits

This commit is contained in:
AlanCoding 2017-01-04 15:06:10 -05:00
parent 5f0940e411
commit 983bee115c

View File

@ -25,6 +25,8 @@ logger = logging.getLogger('awx.sso.views')
class BaseRedirectView(RedirectView):
permanent = True
def get_redirect_url(self, *args, **kwargs):
last_path = self.request.COOKIES.get('lastPath', '')
last_path = urllib.quote(urllib.unquote(last_path).strip('"'))