#30077: TextField constructor needs a strip=False option
-------------------------------------+-------------------------------------
     Reporter:  Rob van der Linde    |                    Owner:  nobody
         Type:  New feature          |                   Status:  new
    Component:  Database layer       |                  Version:  2.1
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Simon Charette):

 * type:  Uncategorized => New feature


Comment:

 Just to make it clear the `strip=True` option was added to
 `forms.CharField` and not `db.CharField` like the report seems to imply.
 Moving this option to the database layer has been discussed and rejected
 when the option was added to the form layer so I doubt there's consensus
 on adding an option to specialize `TextField` here given striping spaces
 should be the desired behaviour in most cases just like with
 `db.CharField`.

 > Other people fix it in the form and override the admin form

 Can't this be simply done with
 
[https://docs.djangoproject.com/en/2.1/ref/contrib/admin/#django.contrib.admin.ModelAdmin.formfield_overrides
 formfield_overrides] or `formfield_for_dbfield`?

-- 
Ticket URL: <https://code.djangoproject.com/ticket/30077#comment:1>
Django <https://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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.d45e8967a999ffabd5a6bdf04c8a22aa%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to