Don Arbow wrote:
> On Oct 3, 2006, at 9:30 PM, Patrick J. Anderson wrote:
>> def main(request):
>>      posts = Post.objects.filter(is_approved =
>> True).order_by('-time_added')[:5]
>>      t = loader.get_template('homepage.html')
>>      c = RequestContext({
>>          'latest_posts': posts,
>>      })
>>      return HttpResponse(t.render(c))
>>
>> What am I doing wrong?
> 
> 
> 
> You have to pass the request object into the RequestContext  
> constructor. Then the user object will show up in your templates.
> 
> c= RequestContext(request, { ... })
> 
> Don
> 
> 
> 
> > 
> 

Thanks, guys!

I guess to create a user info box and make it available in all the 
templates, I'd create a template tag and load it in the base template, 
right?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to