On Jun 11, 8:49 pm, "thsut...@gmail.com" <thsut...@gmail.com> wrote:

>
> This has been trivial in every other framework I've used and I'm sure
> it is in Django as well, but I'm completely stumped. Is there any way
> to do this which doesn't require that I write custom code for every
> form and/or checkbox in my project?

You may be able to write a custom filter that takes in a field, and
returns the type of field it is (see
http://docs.djangoproject.com/en/dev/howto/custom-template-tags/#writing-custom-template-filters).
Then in your code you do something like:

{% ifequal field|field_type 'checkbox' %}
...
{% endifequal %}
--~--~---------~--~----~------------~-------~--~----~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to