-2

I want to pass url parameters in this format http://localhost:8000/api/projects/?id=2021&a=2&b=3&c=4 and get the values in view function

Vas
  • 395
  • 1
  • 3
  • 13
  • Does this answer your question? [Capturing URL parameters in request.GET](https://stackoverflow.com/questions/150505/capturing-url-parameters-in-request-get) – Clepsyd Nov 21 '22 at 03:01
  • See https://stackoverflow.com/questions/150505/capturing-url-parameters-in-request-get and https://stackoverflow.com/questions/48299466/django-rest-framework-passing-parameters-with-get-request-classed-based-views – Clepsyd Nov 21 '22 at 03:02

1 Answers1

0

In DRF you can get values of perms like this...

URL = http://localhost:8000/api/projects/?id=2021&a=2&b=3&c=4

 id = request.query_params.get('id')
 a = request.query_params.get('a')
 b = request.query_params.get('b')
 c = request.query_params.get('c')

 print(id,a,b,c)

Postman Screen

enter image description here