#3515: CSS improvements for newforms fields
------------------------------------------------------+---------------------
   Reporter:  Simon Litchfield <[EMAIL PROTECTED]>  |                Owner:  
nobody                
     Status:  reopened                                |            Component:  
django.newforms       
    Version:  SVN                                     |           Resolution:   
                     
   Keywords:                                          |                Stage:  
Design decision needed
  Has_patch:  1                                       |           Needs_docs:  
1                     
Needs_tests:  1                                       |   Needs_better_patch:  
0                     
------------------------------------------------------+---------------------
Comment (by Petr Marhoun <[EMAIL PROTECTED]>):

 Why should fields care about html? Their job is validation - widgets are
 for html.

 I don't feel that patches from #3512 and #3515 are strong enough. Can I do
 this with them?
  * All rows with a date field have yellow background.
  * All rows with errors have red background.
  * One special row has green background.
  * All required labels are bold.
  * All labels for a password field have blue background.
  * But one of them has black background.
  * All password fields are 10em wide and all text fields are 20em wide.

 I would like to propose new attribute for Widget.init - outer_attrs.
 Widgets wouldn't use it directly - it would be for "outer renderer"
 (!BaseForm._html_output or Fieldline and !AdminField in newforms-admin or
 whatever.)

 I think that in 99 % situations only three pieces information are
 necessary - if row's field is required, if it has error and which kind of
 widget is used. So I also propose new class attribute for Widget -
 default_outer_class. With cascade I could use them for row, labels and
 fields.

 With my patch there would be quite good default values for html classes
 and it would be very flexible. But it is new parameter and it is backward-
 incompatible.

 It is only idea - so there are no tests (and no documentation).

-- 
Ticket URL: <http://code.djangoproject.com/ticket/3515#comment:12>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" 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-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to