Fundraising in PDF.
[wolnelektury.git] / src / api / utils.py
index c9c1f94..3b23246 100644 (file)
@@ -1,6 +1,5 @@
-# -*- coding: utf-8 -*-
-# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
-# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
+# This file is part of Wolne Lektury, licensed under GNU Affero GPLv3 or later.
+# Copyright © Fundacja Wolne Lektury. See NOTICE for more information.
 #
 from django.http import HttpResponse, HttpResponseRedirect
 from django.utils.decorators import method_decorator
@@ -25,8 +24,9 @@ def oauthlib_request(request):
         "headers": headers,
     }
 
-def oauthlib_response((headers, body, status)):
+def oauthlib_response(response_tuple):
     """Creates a django.http.HttpResponse from (headers, body, status) tuple from OAuthlib."""
+    headers, body, status = response_tuple
     response = HttpResponse(body, status=status)
     for k, v in headers.items():
         if k == 'Location':