Re: Custom include tag to parse locale into filename

2008-10-24 Thread Jarek Zgoda
Wiadomość napisana w dniu 2008-10-23, o godz. 22:26, przez Gerard Petersen: > I have an include tag to a file with context help information. My > app is fully i18n-ed, but I don't want to handle the bigger the > helptext via i18n because of its size. I want to end up with > something like

[solved] Custom include tag to parse locale into filename

2008-10-24 Thread Gerard Petersen
Should anybody need this, I customised the include tag (and copied it into templatetags). The code: from django.template.loader_tags import IncludeNode,ConstantIncludeNode def do_i18n_include(parser, token): bits = token.contents.split() if len(bits) != 2: raise TemplateSyntaxE

Custom include tag to parse locale into filename

2008-10-23 Thread Gerard Petersen
Hi All, I have an include tag to a file with context help information. My app is fully i18n-ed, but I don't want to handle the bigger the helptext via i18n because of its size. I want to end up with something like this: myapp/customer_side.en.html. The code snippet: {% include "myapp/cu