Re: urls.py and views.generic issue

2011-02-23 Thread Andrew Petaisto
t; > 2) The slash before the [ is wrong. See > http://docs.python.org/library/re.html [] is used to match a set/range of > characters. > > (?P\[a-z]{3})" > > > > (r'^(?P\d{4})/(?P\[a-z]{3})/(?P\w > {1,2})/(?P\[-w]+)/$', > > (r'^(?P\d{4})/(

RE: urls.py and views.generic issue

2011-02-22 Thread Chris Matthews
n you get the error? Regards Chris -Original Message- From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On Behalf Of Antti Sent: 23 February 2011 06:56 To: Django users Subject: Re: urls.py and views.generic issue Thanks jnns for the response. I tri

Re: urls.py and views.generic issue

2011-02-22 Thread Antti
html')), (r'^$','archive_index', dict(info_dict, template_name='blog/ list.html')), ) On Feb 20, 10:47 pm, Chris Matthews wrote: > It also seems that the space preceding the caret ^ should not be there > > So > > ^blog/ ^(?P\d{4})/$ > > Should

Re: urls.py and views.generic issue

2011-02-22 Thread Antti
Thanks jnns for the response. I tried adding the backslash but it still doesn't match. Would I need to put a different character after the other entries in the expression? What I mean would there be a different character used in "(?P\[a-z]{3})" ? Also one more note if I type in http://127.0.0.1:8

RE: urls.py and views.generic issue

2011-02-20 Thread Chris Matthews
Subject: Re: urls.py and views.generic issue Hi Antti, the url patterns in the tutorial are not correct. The regular expressions are not using character classes but merely plain characters. ^blog/ ^(?Pd{4})/$ should be ^blog/ ^(?P\d{4})/$ Mind the backslash in \d{4}. This way we&#x

Re: urls.py and views.generic issue

2011-02-19 Thread jnns
Hi Antti, the url patterns in the tutorial are not correct. The regular expressions are not using character classes but merely plain characters. ^blog/ ^(?Pd{4})/$ should be ^blog/ ^(?P\d{4})/$ Mind the backslash in \d{4}. This way we're matching for a sequence of four digits and not for a seque

urls.py and views.generic issue

2011-02-19 Thread Antti
The problem: I can't seem to get most of my urls that I type in my browser to math a url in my urls.py file. I am currently doing Web Monkey's Blog Tutorial (http://www.webmonkey.com/2010/02/Get_Started_With_Django/) To date everything has worked but when I try to use the urls from the blog urls.