Adrian Holovaty wrote: > On 1/10/07, Mikko Ohtamaa <[EMAIL PROTECTED]> wrote: > > I see a huge drawback in offloading widget rendering to the template > system -- it couples the forms library to the template system. Ideally > the newforms library, when solidified, would be distributed as a > standalone package that doesn't require the rest of Django. > > What if, instead of using the template system, we just provided a > better hook for specifying display? But before you answer that > question, please tell me this: How does the current Widget system > prevent you from doing what you want to do? I'm still having trouble > understanding your problem. The more concrete your example, the > better.
I think the main problem is that the current mechanism requires the developer to use *code* to change the way the widget is presented. The Django documentation goes some way to explain that web designers only need to know the template system to lay out the data that the programmers have provided for them via code. If we now say that we need to know how to program in python to change the presentation it breaks that paradigm somewhat. I've just been using the CheckboxSelectMultiple widget to display a list of checkboxes for selection of months. We would like to lay them out as 3 rows of 4 checkboxes. My template designer can't do this. I have to alter the code. The *functionality* of CheckboxSelectMultiple is just fine, I don't need to alter it, just the HTML output. If the widgets were driven by template fragments, a bit like inclusion tags, then the designer could give me a template fragment to assign to that widget to get the presentation desired. Previously I was looking at TurboGears widgets. This works very well by each widget having a default template fragment, but also having the ability to change the presentation by assigning just a different template fragment and not touching the code. Regards, Gary. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---