I
I
Igor Che2017-05-30 11:29:32
Django
Igor Che, 2017-05-30 11:29:32

How to find out the url of the page that sent the request in views?

Ajax requests are made to a specific view, requests can be from different pages.
How to get the address of the page from which the request was made in views from request?
Such a trifle, and I have already killed enough time to search, and Google refuses to answer, as if I want something strange.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Penshin, 2017-05-30
@chewarer

request.META.get('HTTP_REFERER ')

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question