[Fixed]-How to write urls.py in django 1.10

1👍

You’re almost there. You’ve imported the view, but you’re still passing in a string as the view instead of the view function itself:

urlpatterns = [
    url(r'^category/(?P<category_slug>[-\w]+)/$', show_category,
        {'template_name':'catalog/category.html'}, 'catalog_category'),
]
👤knbk

Leave a comment