I want to add URL parameter in function based view how can I do?
http://127.0.0.1:8000/xxxxx/4
parameter is 4 I want to aces 4 in view. there is any way to do this?
in Function-Based Views:
def Homepage(request, pk):
In class-based views
self.kwargs['pk']
self.kwargs['blog_ID']
or
def blogpost(request,blog_ID):
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With