Domanda

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.

È stato utile?

Soluzione

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

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top