Hey Wayne - I just submitted something similar - check it out http://code.djangoproject.com/ticket/3515
On Feb 17, 6:57 am, "waylan" <[EMAIL PROTECTED]> wrote: > FYI: I opened a ticket (#3512) and uploaded three separate patches. > Personally, after working out all three, I think I prefer the third > one. If we get some consensus on that, I'll see if I can find the time > to address tests and docs, of if anyone else gets to it first... > > http://code.djangoproject.com/ticket/3512 > > On Feb 16, 2:38 pm, "waylan" <[EMAIL PROTECTED]> wrote: > > > I started to write a patch for this and have a few questions. First, I > > was adding the classes 'error' and 'required'. I think those are > > appropriate names. If anyone feels different speak now. > > > I am adding the class to the <tr>, <li>, and <p> elements for each > > field as that seems to be the general consensus. I realize that some > > may wish to either override or create their own as_methods in a > > subclass etc. In so doing they may want to include their own html > > classes assigned to every field. If the as_methods take this into > > account, then the way I currently have it, every field which is not > > required and without errors will get <tr class=""> which is not very > > clean. As an alternative I could build the entire class definition and > > only add it on error or required, but then we loose the ability to > > include other classes on subclassing. > > > To work around the above problem, I could have _html_output() take > > another argument allowing a list of html classes to be passed in. > > Seeing we are already up to 5, that might be a little much. What do > > you think? Or are people not writing their own as_methods, making this > > a moot point. > > > On Feb 16, 8:47 am, "Ceph" <[EMAIL PROTECTED]> wrote: > > > > If an "error" class is going to be added, we might as well take the > > > leap and add a "required" class, too. > > > > On Feb 15, 7:12 pm, "Brian Morton" <[EMAIL PROTECTED]> wrote: > > > > > I don't know if this has been suggested yet, but has anyone considered > > > > an > > > > enhancement to newforms to optionally allow a field to have a different > > > > class if it has an error? It would be helpful for things like making > > > > error > > > > fields highlighted red, etc. Just a thought. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
