On Tue, Aug 18, 2009 at 5:51 PM, WilsonOfCanada<w...@sfu.ca> wrote: > However, when I send the list over as a dictionary for HTML: > > d["places"] = arrPlaces > > return render_to_response('rentSearch.html', d) > > the HTML using Django has: > > {{ places }} but returns ['C:\\moo', 'C:\\supermoo']
As we've explained already, containers (such as dictionaries and lists) use repr() to display their elements, and repr() for strings shows the escape sequences (e.g. \\ \t \n) and adds surrounding quotes. Hence the output you're getting. If you don't like the way it looks, then either send the list through a filter that outputs it like you want by accessing the elements individually, or iterate over the contents of the list in your template and output it like you want. Cheers, Chris -- http://blog.rebertia.com -- http://mail.python.org/mailman/listinfo/python-list