from django.conf.urls import url

from .views import ProductCatalogue, ProductDetail, product_review


urlpatterns = [
    url(r'^catalogue/$', ProductCatalogue.as_view(), name='catalogue'),
    url(r'^(?P<slug>[\w\-]+)/$', ProductDetail.as_view(), name='detail'),
    url(r'^review/$', product_review, name='review')
]

from django.conf.urls import url

from .views import ProductCatalogue, ProductDetail, product_review


urlpatterns = [
    url(r'^catalogue/$', ProductCatalogue.as_view(), name='catalogue'),
    url(r'^review/$', product_review, name='review'),
    url(r'^(?P<slug>[\w\-]+)/$', ProductDetail.as_view(), name='detail'),
]

Move products:review URLConf above product:detail
Move products:review URLConf above product:detail

The product:detail view is greedy and previously caused the review
URLConf never to be resolved by the correct view

  from django.conf.urls import url
  
  from .views import ProductCatalogue, ProductDetail, product_review
  
  
  urlpatterns = [
      url(r'^catalogue/$', ProductCatalogue.as_view(), name='catalogue'),
+     url(r'^review/$', product_review, name='review'),
      url(r'^(?P<slug>[\w\-]+)/$', ProductDetail.as_view(), name='detail'),
-     url(r'^review/$', product_review, name='review')
  ]
  
Move products:review URLConf above product:detail
## Code Before:
from django.conf.urls import url

from .views import ProductCatalogue, ProductDetail, product_review


urlpatterns = [
    url(r'^catalogue/$', ProductCatalogue.as_view(), name='catalogue'),
    url(r'^(?P<slug>[\w\-]+)/$', ProductDetail.as_view(), name='detail'),
    url(r'^review/$', product_review, name='review')
]

## Instruction:
Move products:review URLConf above product:detail
## Code After:
from django.conf.urls import url

from .views import ProductCatalogue, ProductDetail, product_review


urlpatterns = [
    url(r'^catalogue/$', ProductCatalogue.as_view(), name='catalogue'),
    url(r'^review/$', product_review, name='review'),
    url(r'^(?P<slug>[\w\-]+)/$', ProductDetail.as_view(), name='detail'),
]
