Re: Displaying template location in html

2012-01-31 Thread Ustun Ozgur
+1 for debug toolbar. If you choose to do it manually though, you can make use of a middleware instead of passing templates in each view function explicitly, as shown here: http://djangosnippets.org/snippets/766/ Ustun -- You received this message because you are subscribed to the Google Gr

Re: Displaying template location in html

2012-01-31 Thread Alec Taylor
Thanks donarb, I'll give that toolbar a try. Mario: I though Python has all that fancy metaprogramming stuff like Ruby with Objective C style reflection? On Mon, Jan 30, 2012 at 12:19 PM, donarb wrote: > Use the Django Debug Toolbar, it shows all kinds of things. For > templates, it shows the na

Re: Displaying template location in html

2012-01-29 Thread donarb
Use the Django Debug Toolbar, it shows all kinds of things. For templates, it shows the names of all the templates that make up the given page as well as which tags are used on the page. With DDT, you don't have to annotate (and un-annotate) anything. http://pypi.python.org/pypi/django-debug-tool

Re: Displaying template location in html

2012-01-29 Thread Mario Gudelj
The only way to achieve this would be to pass the template path, inside the view, to the template and render it within the template. Like: d = {'profile':profile:'template_path':"console/account-profile.html"} return render_to_response('console/account-profile.html', d) -m On 29 January

Displaying template location in html

2012-01-28 Thread Alec Taylor
With 40+ HTML files it's easy to get confused as to where each component comes from. I don't want to annotate each file with its relative path manually, as this will prove cumbersome when the site finally goes production. Is there a trick to displaying the template location on-screen? Thanks for