﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
3280	Django should be HTML agnostic	Rob Hudson <treborhudson@…>	Adrian Holovaty	"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.

"	defect	closed	Core (Other)		normal	invalid			Unreviewed	0	0	0	0	0	0
