This is an automated email from the ASF dual-hosted git repository.

machristie pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git

commit 04bae481a639f9d0ff9a922170848f472710c0f6
Author: Marcus Christie <[email protected]>
AuthorDate: Wed Oct 19 18:09:05 2022 -0400

    AIRAVATA-3647 update tutorial to use @api_view
---
 docs/tutorial/custom_ui_tutorial.md | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/docs/tutorial/custom_ui_tutorial.md 
b/docs/tutorial/custom_ui_tutorial.md
index 9d2782b3..df883229 100644
--- a/docs/tutorial/custom_ui_tutorial.md
+++ b/docs/tutorial/custom_ui_tutorial.md
@@ -1199,7 +1199,7 @@ Now we'll create a REST endpoint in our custom Django app 
that will return
 greetings in several languages.
 
 1. In the `$HOME/custom_ui_tutorial_app/custom_ui_tutorial_app/views.py` file,
-   we add the following import:
+   we add the following imports:
 
 <button class="btn" data-clipboard-target="#jsonresponse">
     Copy to clipboard
@@ -1208,6 +1208,7 @@ greetings in several languages.
 
 ```python
 from django.http import JsonResponse
+from rest_framework.decorators import api_view
 ```
 
 </div>
@@ -1220,7 +1221,7 @@ from django.http import JsonResponse
 <div id="languages">
 
 ```python
-@login_required
+@api_view()
 def languages(request):
     return JsonResponse({'languages': [{
         'lang': 'French',

Reply via email to