Commits

Peter Sanchez committed 8ecb9ad

Variable name cleanup

  • Participants
  • Parent commits ce9c0eb

Comments (0)

Files changed (1)

File impersonate/helpers.py

 
 
 def get_redir_path(request=None):
-    next = None
+    nextval = None
     redirect_field_name = getattr(
         settings,
         'IMPERSONATE_REDIRECT_FIELD_NAME',
         None,
     )
     if request and redirect_field_name:
-        next = request.GET.get(redirect_field_name, None)
-    return next or getattr(
+        nextval = request.GET.get(redirect_field_name, None)
+    return nextval or getattr(
         settings,
         'IMPERSONATE_REDIRECT_URL',
         getattr(settings, 'LOGIN_REDIRECT_URL', '/'),
         None,
     )
     if redirect_field_name:
-        next = request.GET.get(redirect_field_name, None)
-        if next:
-            return '?%s=%s' % (redirect_field_name, next)
+        nextval = request.GET.get(redirect_field_name, None)
+        if nextval:
+            return '?%s=%s' % (redirect_field_name, nextval)
     return ''
 
 
         None,
     )
     if redirect_field_name:
-        next = request.GET.get(redirect_field_name, None)
-        if next:
+        nextval = request.GET.get(redirect_field_name, None)
+        if nextval:
             return mark_safe(
                 '<input type="hidden" name="{0}" value="{1}"/>'.format(
                     redirect_field_name,
-                    next,
+                    nextval,
                 )
             )
     return ''