开发者

Django url problem

开发者 https://www.devze.com 2023-01-26 07:58 出处:网络
I\'m getting this error error at / unknown sp开发者_如何学Goecifier: ?P& and I suppose it\'s coming from this line

I'm getting this error

error at /
unknown sp开发者_如何学Goecifier: ?P&

and I suppose it's coming from this line

(r'^(?P<template>\w+)/$', static_page),

I copied this from a tutorial, how do I fix this error ?


You want to use

r'^(?P<template>\w+)/$'

for your regex. You seem to have copied the regex with HTML entities still encoded; the regex engine expects verbatim < and >.

0

精彩评论

暂无评论...
验证码 换一张
取 消