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?
You're looking for the tutorial.
The solution for your example looks like this.
urls.py
from django.urls import path
from . import views
urlpatterns = [
path('xxxx/<int:your_number>/', views.your_view_name),
]
views.py
def your_view_name(request, your_number):
# do things with your_number here.
# if your_number is optional, define a default
return render(...)
def home(request, pk):