Skip to content

Commit

Permalink
pep8
Browse files Browse the repository at this point in the history
  • Loading branch information
azhukov committed Sep 27, 2015
1 parent 91aacc3 commit 29b8166
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
5 changes: 3 additions & 2 deletions django_jsonp/__init__.py
@@ -1,6 +1,7 @@
from __future__ import absolute_import
__version__ = '0.3.0'

from .decorators import jsonp
from .response import JSONPResponse
from .utils import get_callback
from .utils import get_callback

__version__ = '0.3.0'
2 changes: 1 addition & 1 deletion django_jsonp/decorators.py
Expand Up @@ -30,4 +30,4 @@ def get(self, request, *args, **kwargs):

return JSONPfiedCBV
else:
raise NotImplementedError('Only django CBVs and FBVs are supported')
raise NotImplementedError('Only django CBVs and FBVs are supported')
4 changes: 2 additions & 2 deletions django_jsonp/response.py
Expand Up @@ -22,7 +22,7 @@ def __init__(self, data, callback, encoder=DjangoJSONEncoder, safe=True, *args,

@classmethod
def from_http_response(cls, http_response, callback, *args, **kwargs):
return cls(http_response.content, callback, safe=False, *args, **kwargs)
return cls(http_response.content, callback, safe=False, *args, **kwargs)


def get_jsonp_response(data, callback=None):
Expand All @@ -33,4 +33,4 @@ def get_jsonp_response(data, callback=None):
elif isinstance(data, HttpResponse):
return JSONPResponse.from_http_response(data, callback)
else:
raise NotImplementedError('Not supported response type')
raise NotImplementedError('Not supported response type')
2 changes: 1 addition & 1 deletion django_jsonp/utils.py
Expand Up @@ -7,4 +7,4 @@


def get_callback(request):
return request.GET.get(CALLBACK, request.GET.get(JSONP, None))
return request.GET.get(CALLBACK, request.GET.get(JSONP, None))

0 comments on commit 29b8166

Please sign in to comment.