in the above code there is view name with arguments. I have a view name ‘index’ which will render to home page of my website. here is my index view in views.py
so i pass this view name in my another view log_out
def log_out(request):
logout(request)
messages.info(request, 'you have logout successfully')
return redirect('index', foo='bar')# i may change this argument later
after this what should i do should i create a url for accepting argument ‘foo’
to take that ‘foo’ argument should i create another function view!!!
oh! i dont know how is this working.