Closed Uznick closed 10 years ago
I use render_to_response('index.html', c, context_instance=RequestContext(request)), if I remove context_instance, then everything becomes ok.
Django 1.3.1, django-debug-toolbar from the trunk.
Hi! This is a bug, no doubt about it, but could you check if render in Django 1.3 works for you? Basically it is equivalent to the code above and, well, shorter. Cheers!
If you mean this: https://docs.djangoproject.com/en/dev/topics/http/shortcuts/#render, then in 1.3.1 it does not work. Shall I try with 1.3?
Yes, I mean this function. Do not try with 1.3 - let me take a look. :)
Using 1.3's render
will not list any variables added by the dictionary passed to it because the context saved by DDT's middleware in panels/template.py:_store_template_info
is later modified by django's template/loader.py:render_to_string
method (with context_instance.pop()
in the finally
block).
Perhaps the _store_template_info
method should store a copy of the context instead?
This is somewhat amazing. CBV are working well with DDJ. I noticed the way the templates are rendered is totally different between the two.
+1
I tested version 0.8.5 and it works good I tested version 0.9 and it does not work
But using DATABASES settings dict instead of DATABASE_ENGINE breakes 0.8.5, so I needed to disable SQL pannel to make it work with Django 1.4.3
I think this was fixed in 264e6813cb4f70c4a8610d69dfbcb11d37d66e71.
On the "Templates" panel there are only system django context variables, or contact variables that come from middlewares.
It would be great, if there was an option to debug the context variables that I add via my views too.