Pergunta

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.

Foi útil?

Solução

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

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top