On Sep 10, 5:29 pm, "Rob Hudson" <[EMAIL PROTECTED]> wrote: > To avoid adding yet another setting (unless it's warranted here) can > the setting of a doctype in a template tag set a value in > django.conf.settings that django.forms can then check (with a > reasonable default)? > > I recall seeing a patch that adds a new setting and updates (at the > time) django.newforms with some if/else logic based on the setting to > the various widgets' render methods. I can't seem to find it now. > > I'm just trying to point out that for Django to output a string that > then later gets "fixed" smells funny to me (ask Malcolm likes to say).
I completely agree, but I don't think the answer is to use a global variable to influence django.forms. My plan for integration in to Django proper was to modify Django's widget.render method to take an optional as_xhtml=True/False argument. The {% form %} tag would then set that argument based on context._doctype. I would also modify Context to have an is_xhtml() method which does the "self._doctype in xhtml_doctypes" check. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~----------~----~----~----~------~----~------~--~---