Answer the question
In order to leave comments, you need to log in
How to get url in admin panel?
I need to get the string that is written in the admin url. Example site-name/admin/core/person/?param=blablabla/. I need to get the value of param . The only thing that comes to mind is to get this url and separate this line through split. I'm trying to create a procedure in views from request that returns get_full_path () but it returns something like although I tested it not in the admin panel, it returned the full url. Please tell me how can I get the url in the admin panel?
Answer the question
In order to leave comments, you need to log in
request has a GET property and is written request.GET["param"].
if you mean parsing a ready-made url, then you can parse it through urllib.parse.urlparse.
getting parameters self.request.GET.get('param', ''), if there is no given parameter, it will return an empty string.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question