On 20/07/10 13:01, joconnell wrote:
> Hi,
>
> If you use something like
>
> r'^(?P.+)/$'
>
> then a variable called page will get passed to your view. It will
> contain the string that has been matched against the specified pattern
> (in this case any character 1 or more times (.+))
>
Thanks J
Hi,
If you use something like
r'^(?P.+)/$'
then a variable called page will get passed to your view. It will
contain the string that has been matched against the specified pattern
(in this case any character 1 or more times (.+))
I think django uses standard python regular expressions in its ur
Maybe make a pattern like r'(home|about|family|aviation|linux|etc)$' to
match either home, about, family, etc?
The "|" should work like the "OR"-operator.
2010/7/19 Ryan Osborn
> You could try using this as your pattern:
>
> (?P[a-zA-Z0-9-]+)
>
> Ryan
>
> On Jul 19, 1:03 am, Phil Edwards wrote:
You could try using this as your pattern:
(?P[a-zA-Z0-9-]+)
Ryan
On Jul 19, 1:03 am, Phil Edwards wrote:
> On 18/07/2010 23:55, Phil Edwards wrote:
>
>
>
> > -begin-
> > def servePage(request):
> > if request.path[1:] == '':
> > thisPage = Page.objects.get(name = unicode('home'))
> > el
On 18/07/2010 23:55, Phil Edwards wrote:
-begin-
def servePage(request):
if request.path[1:] == '':
thisPage = Page.objects.get(name = unicode('home'))
else:
thisPage = Page.objects.get(name = unicode(request.path[1:]))
sidebar_list = Page.objects.filter(category = thisPage.category)
art
5 matches
Mail list logo