On 11 April 2014 01:11, Gregor Müllegger <gre...@muellegger.de> wrote:
> Hi,
>
> thanks for your input. Unfortunatelly this would fail for int(0):

Not if you encode all values to strings before passing to the
template, so it's "0" instead of 0.

>
> {'value': 0} => <input value>
>
> Gregor
>
>
> 2014-04-10 11:41 GMT+02:00 Tino de Bruijn <tin...@gmail.com>:
>
>> Wouldn't this be easier?:
>>
>> {'required': "", 'name': 'fieldname'} => <input required name="fieldname"
>> />
>>
>> {% for name, value in attrs.items %} {{ name }}{% if value %}="{{ value
>> }}"{% endif %}{% endfor %}
>>
>>
>> Tino
>>

-- 
Łukasz Rekucki

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAEZs-EL%2BNqWuo-F6AkAWCBb5rn_7GKGXkfD35uyfF%2Bqbvss5Sw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to