Skip to content

Commit

Permalink
Fix indentation error in docs (#232)
Browse files Browse the repository at this point in the history
  • Loading branch information
monosans committed Aug 28, 2022
1 parent 74213de commit 634a23f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions docs/source/pages/endpoints.rst
Original file line number Diff line number Diff line change
Expand Up @@ -278,13 +278,13 @@ You can customize how Sanic JWT handles responses on an exception by subclassing
from sanic_jwt import Responses
class MyResponses(Responses):
@staticmethod
def exception_response(request, exception):
exception_message = str(exception)
return json({
'error': True,
'message': f'You encountered an exception: {exception_message}'
}, status=exception.status_code)
@staticmethod
def exception_response(request, exception):
exception_message = str(exception)
return json({
'error': True,
'message': f'You encountered an exception: {exception_message}'
}, status=exception.status_code)
Initialize(app, response_class=MyResponses)
Expand Down
4 changes: 2 additions & 2 deletions docs/source/pages/protected.rst
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ Using the standard `Sanic methodology <http://sanic.readthedocs.io/en/latest/san
.. code-block:: python
class PublicView(HTTPMethodView):
def get(self, request):
return json({"protected": False})
def get(self, request):
return json({"protected": False})
class ProtectedView(HTTPMethodView):
Expand Down

0 comments on commit 634a23f

Please sign in to comment.