'TypeError at /BookList/frame (Dynamic path not working in Django)
so i tried to make a dynamic path in django but when i pass 'frame' as argument in the view function 'details_meetups' that error show up function i got this error. error image
urlpatterns = [
path('admin/', admin.site.urls),
path('BookList', BookList.views.index),
path('BookList/<frame>', BookList.views.Meetup_Details)]
def Meetup_Details(request,frame):
selected_one = {"name":"jacob",
"description":"tall"}
return render('request,BookList/meetup-detail.html',{
"name" : selected_one["name"],
"description" : selected_one["description"]
}
)
Solution 1:[1]
You are not using render() correctly:
return render(request, 'BookList/meetup-detail.html',{
"name" : selected_one["name"],
"description" : selected_one["description"]
https://docs.djangoproject.com/en/dev/topics/http/shortcuts/#render
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | LaCharcaSoftware |
