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})/(
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
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
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
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
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
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.
7 matches
Mail list logo