Sorry if this is too offtopic but I couldn't find any help resources
for Jinja, not on the official page nor trough google. Since Jinja
seems to be very similar to Djangos template system (at least that's
what i read and why i choose Jinja, but I'm pretty new at both
template systems) i hope someone here don't mind to help me out.

I'm writing a tool, that parses playlists (m3u, etc.) to a generic
yaml format and makes XSPF playlists out of that YAML.

So here's my template for the XSPF: http://dpaste.com/21702/
And here's the example YAML playlist: http://dpaste.com/21704/
And finally the output: http://dpaste.com/21705/

First, there's a whole lot of if's in the template. I don't know if
that's a good way to do such thing, maybe i should have done it
another way. And secondly, even if the if-block is not printed
(because the variable is not set) there will still be an empty line.

OK, the second one is only cosmetic but i would prefer it otherwise. I
found the use of "-" in tags to suppress the generating of white space
before or after template tags in the docs (http://jinja.pocoo.org/
documentation/escaping#white space) but if i use '{%- if track.creator
is defined %}<creator>{{ track.creator }}...' for example there is no
whit space at all between the tags, which is kinda ugly too.

Sorry again for being all that offtopic-ish and i apologize in advance
if some of this makes no sense, or if me missing the obvious, i need
sleep... badly i might add. Thanks for any hints. Oh and BTW, is there
really no such thing as a jinja mailinglist?

http://jinja.pocoo.org/
http://www.xspf.org/


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to