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 <[email protected]>

> You could try using this as your pattern:
>
> (?P[a-zA-Z0-9-]+)
>
> Ryan
>
> On Jul 19, 1:03 am, Phil Edwards <[email protected]> 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'))
> > > else:
> > > thisPage = Page.objects.get(name = unicode(request.path[1:]))
> > > sidebar_list = Page.objects.filter(category = thisPage.category)
> > > article_list = Article.objects.filter(page =
> > > thisPage.id).order_by('-amendedon')
> > > return render_to_response('base.html', locals())
> > > ------end------
> >
> > Meh. Don't know what happened to the indentation there, but it should
> > look like this:
> >
> > -----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)
> >      article_list = Article.objects.filter(page =
> > thisPage.id).order_by('-amendedon')
> >      return render_to_response('base.html', locals())
> > ------end------
> >
> > --
> >
> > Regards
> >
> > Phil Edwards   |  PGP/GnuPG Key Id
> > Brighton, UK   |  0xDEF32500
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<django-users%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to