From a cursory play in [https://github.com/kezabelle/django-
strictmodels/commit/1acad9ef63769fc6378c6d023333259c2a8cc41f#diff-
4a6a4e7167b55119eefda4da703221edR160 my toy project], it seems like
hoisting the `TextField.get_prep_value` logic into `to_python` and calling
it from `get_prep_value` like `CharField` does would make the behaviour
consistent.
--
Ticket URL: <https://code.djangoproject.com/ticket/24677>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: => 0
* needs_docs: => 0
* needs_tests: => 0
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/24677#comment:1>
* status: new => assigned
* owner: nobody => rolo
--
Ticket URL: <https://code.djangoproject.com/ticket/24677#comment:2>
Comment (by rolo):
Have created a pull request - https://github.com/django/django/pull/4751
--
Ticket URL: <https://code.djangoproject.com/ticket/24677#comment:3>
Comment (by bronsen):
The test in that PR is using a CharField, however, its docstring mentions
TextField.
--
Ticket URL: <https://code.djangoproject.com/ticket/24677#comment:4>
Comment (by bronsen):
alright, now the test uses TextField:
https://github.com/wildfish/django/commit/461473873131141955882318aa577d5ba9de30bc
--
Ticket URL: <https://code.djangoproject.com/ticket/24677#comment:5>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"19e67c6cd13d6442abb2a6eba1b7fba80dcf5457" 19e67c6c]:
{{{
#!CommitTicketReference repository=""
revision="19e67c6cd13d6442abb2a6eba1b7fba80dcf5457"
Fixed #24677 -- Made TextField.to_python() return a string.
This is consistent with CharField.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/24677#comment:6>