I posted a bug (http://code.djangoproject.com/ticket/3280) before I left work which quickly got shot down by Adrian. :) He's right in that it's a pretty general bug so I bring the conversation here. I'm curious what the Django devs will make of my reasoning...
I realize some of these aren't directly related to whether Django itself prefers XHTML. Some are more along the lines of how easy it should be to work around Django if you prefer HTML4. The following are what I think are valid reasons why Django should be HTML agnostic. 1. Display code should be separate from logic. Ideally, all HTML would be in template files that one could override if need be in their own template directory, just like the admin templates. If django.forms did this, that would be great. The only consideration I can think of is what kind of load would this be to necessitate a file system call to pull in the widget template or error template? 2. The argument against #1 that I've seen is usually that you can subclass Something and write your own output. But in some ways, this violates the DRY principle. The code to output a form widget, for example, is already written, and in looking at what it would take, the only change in the render() method would be the change of the HTML itself. 3. Better "updatability": If there is a bug in Select(Widget) that was fixed but I have MySelect(Widget) which is mostly the same except for the HTML, I wouldn't get the fix unless I noticed and updated my code as well. Whereas if Select(Widget) pulled in a template and I overrode that template, the fix would come down just fine across all my projects. 4. One of the reasons I've seen touted for the template system not having access to Python methods and having it's own language is the benefit of separating the programmer from the designer and that designers shouldn't need to know Python to create templates in Django. But they would if they want to manipulate forms or form error feedback. This should be consistent. If there's agreement, I'd be happy to help in the effort to make this happen. Initially I suppose the discussion is whether this is worth it at all. I also grepped the code looking for HTML tags and besides a few places (the Django error page, for example) this is directed at django.forms (newforms). Thanks, Rob --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to [email protected] 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 -~----------~----~----~----~------~----~------~--~---
