Sunday, April 25, 2010

Template tag to display boolean values?

I am looking for a way to display a boolean value, with the "on" / "off" icon that the Django Admin uses in the change list, but within a template view of a single object.  The documentation refers to a "custom tag", but I am not sure if the code or tag is accessible from elsewhere - there is no documentation for any tags to display booleans on the API document page (http://docs.djangoproject.com/en/1.1/ref/templates/builtins/#built-in-tag-reference).  The tag also needs to be able to handle MySQL "booleans" (which are tinyint fields with values of 0 or 1).

Thanks
Derek

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

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate