Commits

Peter Sanchez  committed 789bea6 Merge

Merged in updates

  • Participants
  • Parent commits 2869cb6, b52a675
  • Branches py3k

Comments (0)

Files changed (2)

File impersonate/decorators.py

 def allowed_user_required(view_func):
     def _checkuser(request, *args, **kwargs):
         if not request.user.is_authenticated():
-            return redirect('%s?%s=%s' % (
+            return redirect('{0}?{1}={2}'.format(
                 settings.LOGIN_URL,
                 REDIRECT_FIELD_NAME,
                 urlquote(request.get_full_path()),

File impersonate/helpers.py

     if redirect_field_name:
         nextval = request.GET.get(redirect_field_name, None)
         if nextval:
-            return '?%s=%s' % (redirect_field_name, nextval)
+            return '?{0}={1}'.format(redirect_field_name, nextval)
     return ''