Re: Static files
On May 18, 10:03 pm, Kevin Monceaux <Ke...@RawFedDogs.net> wrote:
> John,
>
> On Wed, May 18, 2011 at 09:12:59AM -0700, John Wheeler wrote:
> > I had to change
>
> > return render_to_response('index.html', {'form': form})
>
> > to
>
> > return render_to_response('index.html', {'form': form},
> > context_instance=RequestContext(request))
>
> And if you're running Django 1.3, you can change:
>
> return render_to_response('index.html', {'form': form},
> context_instance=RequestContext(request))
>
> to:
>
> return render(response, 'index.html', {'form': form})
>
> which I just discovered earlier today while fighting with a similar
> problem. I was having trouble accessing currently logged in user info
> in my templates because I wasn't using RequestContext.
>
> --
>
> Kevinhttp://www.RawFedDogs.nethttp://www.WacoAgilityGroup.org
> Bruceville, TX
>
> What's the definition of a legacy system? One that works!
> Errare humanum est, ignoscere caninum.
More on this ...
http://www.import-awesome.com/how-requestcontext-works-and-why-its-awesome
--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home