My url.py is as below,
from myapp import views
urlpatterns = [
url(r'^myapp/get_requests/$', views.get_requests),
]
Now my views.py is as below,
@api_view(['GET'])
def get_request(request):
#How can I get request ID (base url here)?
return HttpResponse('test')
In the above if I do request in my browser with url as below it reaches my get_request method,
http://localhost:8080/myapp/get_requests/
But the same gives error 404 when I try with some ID in the end as below,
http://localhost:8080/myapp/get_requests/40
Now How can I get this ID number 40 in my views.py method?