Skip to content

Commit

Permalink
Merge pull request #446 from AvdN/patch-2
Browse files Browse the repository at this point in the history
Deprecated example code, clarification
  • Loading branch information
fscherf committed Jul 25, 2023
2 parents c322810 + 8d39aa8 commit 0c2edf2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions doc/content/api-reference/views.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,12 @@ To mark a view non interactive, use the ``interactive`` keyword in the
# views/json_api.py
from lona import LonaView
from lona import LonaView, JsonResponse
class JSONAPIView(LonaView):
def handle_request(self, request):
return {
'json': {'exit_code': 0, 'value': 'foo'},
}
return JsonResponse({'exit_code': 0, 'value': 'foo'})
HTTP Pass Through
Expand Down Expand Up @@ -163,6 +161,8 @@ The following route matches any URL beginning with ``prefix``:
Trailing Slashes
~~~~~~~~~~~~~~~~

Make the trailing slash in a URL optional by ending the route with ``(/)``):

.. code-block:: python
# routes.py
Expand Down

0 comments on commit 0c2edf2

Please sign in to comment.