Custom template tag with boolean parameter?

2010-08-07 Thread adambossy
I have a custom template tag that looks like so: @register.inclusion_tag('bar.html') def foo(b=None) return locals() The variables b is a boolean. How do I pass a boolean to it from the django template? {% foo "False" %} causes the variable to be evaluated as True. (see discussion here: htt

Re: Model translation

2010-08-07 Thread Anssi Kaariainen
On Aug 7, 11:34 pm, David Danier wrote: > What about "putting common data into its own model"? I like this > solution, I even like this solution so much I tried to implement it > several times. BUT you cannot get it to use a nice query. Most of the > time you will need to fetch the translation in

Re: Model translation

2010-08-07 Thread David Danier
Hi all, sorry if this gets very long, but I will try to write down my current opinion and experience with so called "model translation". I have put up multiple sites using translatable content and I have written some apps to help me doing so (none of which are public so far, as I hated my first ap

Re: Proposal: Revised form rendering

2010-08-07 Thread Chris
I'm a big +1 on the rendering with templates, as well as multiple template tags, I see something like: {% form new_user_form as_p %} {% fieldset user_info %} {% field username %} {% field password %} {% endfieldset %} {% endform %} or something similar, you could possibly even specify att