Closed vivazzi closed 8 years ago
If click "View on site" at admin panel then django cannot find url for product and order. It will work if add slash to: 1 - product.py (of myshop app)
# myshop/urls/product.py url(r'^(?P<slug>[\w-]+)$', ProductRetrieveView.as_view(serializer_class=ProductDetailSerializer)), -> url(r'^(?P<slug>[\w-]+)/$', ProductRetrieveView.as_view(serializer_class=ProductDetailSerializer))
2 - order.py (of shop app)
# shop/urls/order.py url(r'^(?P<pk>\d+)$', OrderView.as_view(many=False)), -> url(r'^(?P<pk>\d+)/$', OrderView.as_view(many=False)),
I personally prefer detail views without a final slash to indicate that they are leaves. Just tried out with our product and order detail view and they both work fine.
How is your setting?
If click "View on site" at admin panel then django cannot find url for product and order. It will work if add slash to: 1 - product.py (of myshop app)
2 - order.py (of shop app)