Re: use default value for an unavailable variable on a tag

2007-03-19 Thread Jon Colverson
Michel Thadeu Sabchuk wrote: > I've done a custom tag to use on my templates and I ned to pass a > variable to it, but this variable can or cannot exists. If the > variable doesn't exists, I get an error telling that form.data doesn't > have the key "city". In your tag you can catch the exception

use default value for an unavailable variable on a tag

2007-03-19 Thread Michel Thadeu Sabchuk
Hi guys! I've done a custom tag to use on my templates and I ned to pass a variable to it, but this variable can or cannot exists. If the variable doesn't exists, I get an error telling that form.data doesn't have the key "city". To avoid this error I've done: {% block body_onload %} {% if