Hello folks! Django cares about model-view-controller separation, but the HTML for the widgets is hardcoded in the render method. I would propose to have overridable templates for the widgets, so every project could have specific presentation of widgets in the system (render method should take a template from the file system and render that with some field- specific variables passed).
This would allow developers to add specific attributes, javascripts or html containers for all widgets in the project. For example, we had a project, where 4 <div> elements with specific css classes had to be added around each input field to make resizable widgets with rounded corners. Another use case would be to change all select fields to combo boxes (some JavaScript libraries only allow that if you add specific attributes to the select tag). Or adding additional CSS classes to different input types so that all checkboxes could be styled differently than all text input fields. The templates for each widget could be cached somewhere, so the accessing the file system shouldn't be a big performance issue. What's your opinion about that? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---