django http redirect code example
Example 1: redirect django
from django.shortcuts import redirect
def my_view(request):
# ...
return redirect('some-view-name', foo='bar')
Example 2: django login redirect
LOGIN_REDIRECT_URL = 'home'
Example 3: django redirect url
LOGIN_REDIRECT_URL = 'your_url'
LOGOUT_REDIRECT_URL = 'your_url'