A
A
Animkim2016-05-07 16:41:48
Django
Animkim, 2016-05-07 16:41:48

What is the correct way to validate the requested url in Django?

While I thought of this, take the requested url from request.path and compare it with the absolute url of the requested object.
How true is this?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Anatoly Scherbakov, 2016-05-07
@Altaisoft

What does "verify" mean?
- What is the requested object and how do you get its URL?
- you use for this task urls.py?

V
Vladimir Kuts, 2016-05-08
@fox_12

Read about organizing urls.py
URL requests that match the appropriate url patterns perform the specified functions.
That is, if the corresponding function from the view worked for you, then the required url-pattern has been executed.
You specify why you need to "check" the requested url. Such a strong impression that you are doing something wrong.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question