Question

I'm trying to create a named URL that I can refer to in my templates to point to a page with various parameters but I am getting a syntax error for the following line:

    (r'^page/(?P<page_id>\d+)/(?P<page_slug>[-\w]+)/$', 'cms.views.detail', name='page_view'),

If I remove the name='page_view' part, the error goes away.

Can anyone see what I've done wrong?

Any advice appreciated.

Thanks.

Was it helpful?

Solution

Does it change if you put the url() around it instead of just parentheses?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top