문제

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.

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top