Re: regex in url

2007-07-17 Thread Jacob Kaplan-Moss
On 7/16/07, james_027 <[EMAIL PROTECTED]> wrote: > Yes I am looking for the explanation of ?P syntax, is this > something related to python's regex or django's own regex. Ned's quick answer below is quite clear, I think, but if you'd like more details from the horse's mouth (as it were), the offi

Re: regex in url

2007-07-17 Thread Ned Batchelder
For a quick answer: (?Pxxx) means: "match xxx, and store it as a value named blah in the result". This lets the regex machinery build a set of name/value pairs suitable for use as arguments to a view function. --Ned. james_027 wrote: > hi kenneth, > > thanks a lot, i think should be looking

Re: regex in url

2007-07-16 Thread james_027
hi kenneth, thanks a lot, i think should be looking at official python doc more than the dive into python. cheers, james On Jul 17, 12:47 pm, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote: > On 17-Jul-07, at 9:36 AM, james_027 wrote: > > > Yes I am looking for the explanation of ?P syntax, is thi

Re: regex in url

2007-07-16 Thread Kenneth Gonsalves
On 17-Jul-07, at 9:36 AM, james_027 wrote: > Yes I am looking for the explanation of ?P syntax, is this > something related to python's regex or django's own regex. python -- regards kg http://lawgon.livejournal.com http://nrcfosshelpline.in/web/ --~--~-~--~~~-

Re: regex in url

2007-07-16 Thread james_027
Yes I am looking for the explanation of ?P syntax, is this something related to python's regex or django's own regex. thanks james On Jul 17, 11:57 am, "Russell Keith-Magee" <[EMAIL PROTECTED]> wrote: > On 7/17/07, james_027 <[EMAIL PROTECTED]> wrote: > > > I am very new to django as well as py

Re: regex in url

2007-07-16 Thread Russell Keith-Magee
On 7/17/07, james_027 <[EMAIL PROTECTED]> wrote: > I am very new to django as well as python. how is it that ?P > seems to be ignore by the regex function? I can't see any explanation > in django's documentation. is this something magic or hack my django? What do you mean by ignored? Are you get

regex in url

2007-07-16 Thread james_027
hi, urlpatterns = patterns('', (r'^polls/$', 'mysite.polls.views.index'), (r'^polls/(?P\d+)/$', 'mysite.polls.views.detail'), (r'^polls/(?P\d+)/results/$', 'mysite.polls.views.results'), (r'^polls/(?P\d+)/vote/$', 'mysite.polls.views.vote'), ) I am very new to django as well as