Learn django), In url.py file i wri" />
开发者

Error in django url.py?

开发者 https://www.devze.com 2022-12-24 18:38 出处:网络
I am new in django. I try to practice and run the wiki application (i found tutorial at http://showmedo.com/videotutorials/video?name=1100000&fromSeriesID=110\">Learn django), In url.py file i wri

I am new in django. I try to practice and run the wiki application (i found tutorial at http://showmedo.com/videotutorials/video?name=1100000&fromSeriesID=110">Learn django), In url.py file i write the following urls...

urlpatterns = patterns('',    
    (r'^wikicamp/(?p<page_name>[^/]+)/edit/$','wikiapp.wiki.views.edit_page'),
    (r'^wikicamp/(?p<page_name>[^/]+)/save/$','wikiapp.wiki.views.save_page'),
    (r'^wikicamp/(?p<page_name>[^/]+)/$','wikiapp.wiki.views.view_page'),
)

But there is errror which i cant understand.

sre_Constants.error:Unexpected end of pattern.
  (r'^wiki开发者_开发知识库camp/(?p<page_name>[^/]+)/$','wikiapp.wiki.views.view_page'), 

I use the Django-1.0.2-final.tar.gz


You need to use an uppercase P to capture named regexp groups:

urlpatterns = patterns('',    
    (r'^wikicamp/(?P<page_name>[^/]+)/edit/$','wikiapp.wiki.views.edit_page'),
    (r'^wikicamp/(?P<page_name>[^/]+)/save/$','wikiapp.wiki.views.save_page'),
    (r'^wikicamp/(?P<page_name>[^/]+)/$','wikiapp.wiki.views.view_page'),
)
0

精彩评论

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