티스토리 뷰

공부

[Django] redirect

seunggabi 승가비 2020. 8. 5. 02:59
# views.py
from django.shortcuts import redirect

def redirect_view(request):
    response = redirect('/redirect-success/')
    return response

 

https://realpython.com/django-redirects/

 

The Ultimate Guide to Django Redirects – Real Python

In this detailed guide, you'll learn everything you need to know about HTTP redirects in Django. All the way from the low-level details of the HTTP protocol to the high-level way of dealing with them in Django.

realpython.com

 

'공부' 카테고리의 다른 글

[Python] POST json  (0) 2020.08.10
[Python] mail  (0) 2020.08.10
[Django] redirect  (0) 2020.08.05
[Django] templates  (0) 2020.08.05
[Django] {% url ... %}  (0) 2020.08.05
[Python] random  (0) 2020.08.05
댓글
댓글쓰기 폼