1👍
✅
I replace the URL path
urlpatterns = [
path("product/<str:title>/<slug:pname>/<str:puid>",views.viewProduct),
]
2👍
The B0882NKXW7
is not a valid format for a UUID [wiki]. Indeed, a UUID is typically represented as 16 octets. For example 2707820f-5182-407d-9c07-ff7845807d4c
is a UUID.
You can either define your own path converter [Django-doc] to accept your product id, or you can make use of str:
:
urlpatterns = [
path('product/<str:title>/<slug:pname>/<str:puid>', views.viewProduct),
]
- [Django]-Prevent syncdb from updating database in Django?
- [Django]-Django ImportError: Module "social_core.backends.google" does not define a "GoogleOpenId" attribute/class
Source:stackexchange.com