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
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
>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
3 matches
Mail list logo