#1679: Decouple single vs. multiline widget choice from database storage type 
for
CharField vs. TextField
------------------------------------+---------------------------------------
 Reporter:  [EMAIL PROTECTED]  |       Owner:  adrian
     Type:  enhancement             |      Status:  new   
 Priority:  normal                  |   Milestone:        
Component:  Admin interface         |     Version:        
 Severity:  normal                  |    Keywords:        
------------------------------------+---------------------------------------
 This patch makes the choice of limited vs. unlimited database storage
 (models.!CharField vs. models.!TextField) orthogonal to the choice of
 single vs. multiline widget (forms.!TextField vs. forms.!LargeTextField).
 
 The fact that models.!CharField used to use forms.!TextField is an
 indication that something was wrong ;-)
 
 For backwards compatibility, but much more importantly, because it's the
 reasonable thing to expect, the defaults are identical to the current
 behaviour.  To get a multiline !CharField, do: {{{ foo =
 CharField(maxlength=MAX_FOO, multiline_admin=True)}}}.  Conversely, to get
 a single-line !TextField: {{{ bar = TextField(multiline_admin=False)}}}.
 There -- now postgres users have no reason to use !CharField anymore,
 unless there is a real and legitimate limit to the max size a value can
 have.
 
 The argument {{{multiline_admin}}} was chosen to be consistant with
 {{{radio_admin}}} which is the only other similar argument I found.
 
 Patch taken against magic-removal as of this post.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/1679>
Django <http://code.djangoproject.org/>
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 django-updates@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-updates
-~----------~----~----~----~------~----~------~--~---

Reply via email to