from django.conf.urls import patterns, url

from . import views


urlpatterns = [
    url(r'^(?P<slug>[a-z0-9-]+?)-(?P<product_id>[0-9]+)/$',
        views.product_details, name='details'),
    url(r'^category/(?P<slug>[a-z0-9-]+?)/$', views.category_index,
        name='category')
]

from django.conf.urls import url

from . import views


urlpatterns = [
    url(r'^(?P<slug>[a-z0-9-]+?)-(?P<product_id>[0-9]+)/$',
        views.product_details, name='details'),
    url(r'^category/(?P<slug>[\w-]+?)/$', views.category_index,
        name='category')
]

Fix url pattern for category's slug
Fix url pattern for category's slug

- from django.conf.urls import patterns, url
+ from django.conf.urls import url
  
  from . import views
  
  
  urlpatterns = [
      url(r'^(?P<slug>[a-z0-9-]+?)-(?P<product_id>[0-9]+)/$',
          views.product_details, name='details'),
-     url(r'^category/(?P<slug>[a-z0-9-]+?)/$', views.category_index,
+     url(r'^category/(?P<slug>[\w-]+?)/$', views.category_index,
          name='category')
  ]
  
Fix url pattern for category's slug
## Code Before:
from django.conf.urls import patterns, url

from . import views


urlpatterns = [
    url(r'^(?P<slug>[a-z0-9-]+?)-(?P<product_id>[0-9]+)/$',
        views.product_details, name='details'),
    url(r'^category/(?P<slug>[a-z0-9-]+?)/$', views.category_index,
        name='category')
]

## Instruction:
Fix url pattern for category's slug
## Code After:
from django.conf.urls import url

from . import views


urlpatterns = [
    url(r'^(?P<slug>[a-z0-9-]+?)-(?P<product_id>[0-9]+)/$',
        views.product_details, name='details'),
    url(r'^category/(?P<slug>[\w-]+?)/$', views.category_index,
        name='category')
]
