Re: RequestContext(request)

2012-01-09 Thread Jonas Geiregat
form = newform() # An unbound form > >return render_to_response('index.html', { >'form': form, >},context_instance=RequestContext(request)) > > > > but everytime i add the context_instance=RequestContext(req

Re: RequestContext(request)

2012-01-09 Thread Jonas Geiregat
form = newform() # An unbound form > >return render_to_response('index.html', { >'form': form, >},context_instance=RequestContext(request)) > > > > but everytime i add the context_instance=RequestContext(req

RequestContext(request)

2012-01-08 Thread Hassan
p = newsletter(question = "" + str(request.POST.get('question')) , email = "" + str(request.POST.get('email'))) p.save() else: form = newform() # An unbound form return render_to_response('index.html', {

Re: How to avoid repeated "context_instance = RequestContext(request)" args when rendering?

2011-08-15 Thread Jirka Vejrazka
>> > ... I'm hoping some standard solution >> > already exists.)  Sorry to be so long winded. Hi there, in older Django versions, you can use direct_to_template from generic views to automatically use RequestContext. I'm using it to save a line or two per view. Not a magic solution, but might

Re: How to avoid repeated "context_instance = RequestContext(request)" args when rendering?

2011-08-15 Thread Rodney Topor
static files from templates, you write something like > > {{ STATIC_URL }}css/mystyle.css.  For STATIC_URL to be bound to the > > value assigned in settings.py, it is apparently necessary to include > > "context_instance = RequestContext(request)" when you render the > > t

Re: How to avoid repeated "context_instance = RequestContext(request)" args when rendering?

2011-08-15 Thread fredb
necessary to include > "context_instance = RequestContext(request)" when you render the > template.  And you have to do this even if you don't need the > RequestContext for CSRF protection or any other reason.  In effect, > that means you have to include the RequestConte

How to avoid repeated "context_instance = RequestContext(request)" args when rendering?

2011-08-15 Thread Rodney Topor
tance = RequestContext(request)" when you render the template. And you have to do this even if you don't need the RequestContext for CSRF protection or any other reason. In effect, that means you have to include the RequestContext *every* time you render a template (assuming every template contains