diff options
| author | Claude Paroz <claude@2xlibre.net> | 2016-04-23 19:13:31 +0200 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2016-05-04 20:02:01 +0200 |
| commit | 388bb5bd9aa3cd43825cd8a3632a57d8204f875f (patch) | |
| tree | ae1d5c1d06234b79ec3a668df2e4926f73d30ce7 /docs/releases | |
| parent | 1206eea11e506c4e740ba2f0c1feaa01452d804b (diff) | |
Fixed #22936 -- Obsoleted Field.get_prep_lookup()/get_db_prep_lookup()
Thanks Tim Graham for completing the initial patch.
Diffstat (limited to 'docs/releases')
| -rw-r--r-- | docs/releases/1.10.txt | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/docs/releases/1.10.txt b/docs/releases/1.10.txt index 826752996b..e750fb1d47 100644 --- a/docs/releases/1.10.txt +++ b/docs/releases/1.10.txt @@ -677,6 +677,25 @@ You can check if your database has any of the removed hashers like this:: # Unsalted MD5 passwords might not have an 'md5$$' prefix: User.objects.filter(password__length=32) +``Field.get_prep_lookup()`` and ``Field.get_db_prep_lookup()`` methods are removed +---------------------------------------------------------------------------------- + +If you have a custom field that implements either of these methods, register a +custom lookup for it. For example:: + + from django.db.models import Field + from django.db.models.lookups import Exact + + class MyField(Field): + ... + + class MyFieldExact(Exact): + def get_prep_lookup(self): + # do_custom_stuff_for_myfield + .... + + MyField.register_lookup(MyFieldExact) + :mod:`django.contrib.gis` ------------------------- |
