#26821: 'NoneType' object has no attribute 'strip' -------------------------------------+------------------------------------- Reporter: vinaykrsharma | Owner: PriyWerry Type: Bug | Status: assigned Component: Forms | Version: master Severity: Normal | Resolution: Keywords: error,form fields, | Triage Stage: Accepted strip | Has patch: 0 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------------+-------------------------------------
Comment (by PriyWerry): Replying to [comment:6 timgraham]: > I don't understand the reason for a deprecation here. Passing `strip=False` doesn't have an effect on these fields anyway, does it? The value is always stripped regardless, isn't it? The idea was to use a simple mechanism without having to pop the keyword arg strip from kwargs. This is for example also done in django.db.models.aggregates for the Count class. If someone would execute the following command, an error will be thrown: {{{ >>> Count(some_field, output_field=FloatField()) TypeError: __init__() got multiple values for keyword argument 'output_field' }}} I think (and I discussed this with Erk as well) that we also want this for EmailFields and URLFields. If we keep silently popping the strip argument, developers can be confused when passing {{{strip=False}}}, because it still behaves as if {{{strip=True}}}. -- Ticket URL: <https://code.djangoproject.com/ticket/26821#comment:7> 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/071.34087a4e899531562114504bf310ef97%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.