On Sep 30, 7:50 pm, Karen Tracey <kmtra...@gmail.com> wrote:
> On Wed, Sep 30, 2009 at 6:28 PM, willfe <wil...@gmail.com> wrote:
>
> > *sigh* I was just about to post this as-is, and tried one more thing,
> > which fixed it. I hadn't added context_instance=RequestContext
> > (request) to the end of the render_to_response() return in the
> > specific method I was working with. I'd added it to a different one
> > instead. It's fixed and working -- I'll put on a dunce cap and sit in
> > the corner until I've learned my lesson :)
>
> Hmm...yeah, that's the other common reason for things not to appear when
> expected, if they're set by a context processor and you haven't used
> RequestContext. I'm surprised, though, that the debug toolbar showed
> messages being in the context in the case where you were not passing a
> RequestContext...that seems pretty misleading.  I haven't used debug toolbar
> in a little while though so perhaps I'm misunderstanding something about
> what it was showing.

Yeah, it definitely confused me for a bit before realizing my goof.

This does raise another question though -- is there ever an instance
where I *shouldn't* be using RequestContext in a view (that emits a
real page instead of a redirect)? If it's meant to be used pretty much
everywhere, is there a more DRY way of using it than bolting on
context_instance=RequestContext(request) to the argument list of
render_to_response()?
--~--~---------~--~----~------------~-------~--~----~
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 
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