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 django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to