Re: "-" in template variables

2009-05-10 Thread Danne
Yeah, that could have been a greate solution :) The problem is that there is a huge amount of key-value sets to replace, and i don't want to replace "-" in the blog posts (Tumblr is a blogging service). That would result in a pretty complex regular expression. What I did instead to solve this was

Re: "-" in template variables

2009-05-10 Thread Daniel Roseman
On May 10, 1:58 am, Danne wrote: > I'm using the Tumblr (http://www.tumblr.com) REST Api, and keys in > returned json contains the character "-", like "post": {"regular- > title": "asdf" .}. I'm having trouble printing this in the django > templates since regular-title is an invalid variable

Re: "-" in template variables

2009-05-10 Thread Dougal Matthews
>From the docs; "Variable names must consist of any letter (A-Z), any digit (0-9), an underscore or a dot." http://docs.djangoproject.com/en/dev/ref/templates/api/#rendering-a-context I suppose you could write a template tag to handle it or something. Not sure. Dougal --- Dougal Matthews - @d0