On Tue, Jul 12, 2011 at 2:25 PM, bruno desthuilliers <bruno.desthuilli...@gmail.com> wrote: > On Jul 12, 3:07 pm, Tom Evans <tevans...@googlemail.com> wrote: > (snip) >> Programming by permutation is never a good strategy. > > Indeed. Yet: > >> A typical view using RequestContext and render_to_response should look >> like this: >> >> def someview(request): >> ctxt = RequestContext({ >> 'hello': 'world', >> }) >> return render_to_response('sometemplate.html', context_instance=ctxt) > > which is NOT what you'll find in django's doc nor in about 99+% of the > available snippets, pluggable apps and other available source code > examples which all use the same pattern as the OP. >
Looks exactly like the example from [1], apart from using render_to_response shortcut rather than manually rendering the template. Cheers Tom [1] https://docs.djangoproject.com/en/dev/ref/templates/api/#subclassing-context-requestcontext -- 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.