Commit Graph

825 Commits

Author SHA1 Message Date
Sergey Fedoseev 38988f289f Avoided creation of temporary sets. 2017-07-29 10:16:43 -04:00
Mariusz Felisiak b61d5b1991 Fixed #28371 -- Fixed Cast() with CharField if the max_length argument isn't provided.
Thanks Tim Graham for the review.
2017-07-27 19:36:47 +02:00
Mariusz Felisiak 8e41373c81 Allowed database backends to specify data types for Cast().
A small refactor ahead of refs #28371.
2017-07-26 20:26:58 -04:00
Tim Graham 487362fa8f Fixed #28370 -- Deprecated the context arg of Field.from_db_value() and Expression.convert_value().
Unused since a0d166306f.
2017-07-20 16:30:08 -04:00
Sergey Fedoseev 37fbeb99f9 Removed unused models.DecimalField._format().
Unused since b3b71a0922.
2017-07-20 09:00:18 -04:00
Mariusz Felisiak 776cee9749 Fixed #28391 -- Fixed Cast() with CharField and max_length on MySQL.
Thanks Tim Graham for the review.
2017-07-17 21:12:27 +02:00
Tim Graham 686772c177 Removed unused OrderWrt.deconstruct(). 2017-07-06 18:45:53 -04:00
Paulo Alvarado c432927160 Fixed #26362 -- Fixed update of the inherited id field of an object when its parent changes. 2017-06-26 12:11:20 -04:00
Maciej Jaworski dc63ad7ac0 Fixed #28319 -- Made TextField with choices use a Select widget. 2017-06-17 08:23:32 -04:00
chillaranand fb0f987f7d Fixed #27914 -- Added support for nested classes in Field.deconstruct()/__repr__(). 2017-06-14 10:10:17 -04:00
Adam Bogdał 9f4e0fde0a Moved common code to RelatedField.deconstruct(). 2017-06-14 08:57:43 -04:00
Adam Bogdał cd2fe829dd Fixed #24195 -- Deconstructed the limit_choices_to option of related fields.
Migrations will now be created for changes to limit_choices_to.
2017-06-14 08:57:24 -04:00
Tim Graham 5a52d932ef Replaced Model._get_pk_val() with pk property.
Model.pk was added after _get_pk_val() and many places weren't simplified.
2017-06-05 15:20:34 -04:00
Jon Dufresne 2c69824e5a Refs #23968 -- Removed unnecessary lists, generators, and tuple calls. 2017-06-01 19:08:59 -04:00
Manatsawin Hanmongkolchai a0c07d77fc Fixed #28242 -- Moved ImageField file extension validation to the form field. 2017-06-01 10:13:23 -04:00
Tim Graham 59ab1b2683 Fixed #28210 -- Fixed Model._state.adding on MTI parent model after saving child model.
Regression in 38575b007a.
2017-05-19 13:22:17 -04:00
Tim Graham a9874d48b1 Fixed #28188 -- Fixed crash when pickling model fields.
Regression in d2a26c1a90.

Thanks Adam Alton for the report and test, and Adam Johnson for
suggesting the fix.
2017-05-11 21:04:52 -04:00
Claude Paroz a87189fc5e Fixed #28164 -- Improved float conversions in DecimalField.to_python
Thanks Tim Graham and Adam Johnson for the reviews.
2017-05-09 08:40:08 +02:00
Tim Graham d66378a8b2 Fixed #28175 -- Fixed __in lookups on a foreign key when using the foreign key's parent model as the lookup value.
Thanks Simon Charette for review.
2017-05-05 18:35:08 -04:00
Tim Graham 584e10c76e Fixed #28166 -- Fixed Model._state.db on MTI parent model after saving child model.
Regression in 38575b007a.
2017-05-03 12:14:15 -04:00
Claude Paroz 301de774c2 Refs #27795 -- Replaced many force_text() with str()
Thanks Tim Graham for the review.
2017-04-27 09:10:02 +02:00
Simon Charette ec50937bcb Refs #20939 -- Removed the Query._forced_pk hack. 2017-04-25 23:43:33 -04:00
Carles Pina Estany 9f2e8b5bb7 Fixed #28120 -- Checked that CharField.max_length is not a boolean. 2017-04-24 18:49:31 -04:00
Tim Graham fce7827101 Fixed #28047 -- Fixed QuerySet.filter() crash when it uses the name of a OneToOneField pk.
Regression in 1bc249c2a6.
2017-04-10 09:51:51 -04:00
Ingo Klöcker c4536c4a54 Fixed #27777 -- Made File.open() work with the with statement (#8310)
Fixed #27777 -- Made File.open() work with the with statement
2017-04-07 14:21:06 +02:00
Kapil Garg 7e09fa7f51 Fixed #27969 -- Fixed models.Field.formfield() setting 'disabled' for fields with choices. 2017-03-23 13:22:04 -04:00
Adam Chainz a452dddb25 Fixed #27904 -- Added a system check that Field.validators are callable. 2017-03-11 12:27:29 -05:00
Claude Paroz 8346680e1c Refs #27795 -- Removed unneeded force_text calls
Thanks Tim Graham for the review.
2017-03-04 18:18:21 +01:00
Anton Samarchyan 60e52a047e Refs #27656 -- Updated django.db docstring verbs according to PEP 257. 2017-02-28 09:17:27 -05:00
Tim Graham d6e26e5b7c Removed obsolete references to form_for_instance(). 2017-02-28 07:37:25 -05:00
Alexey Rogachev c743af82cf Fixed typo in DurationField's docstring. 2017-02-20 08:44:05 -05:00
ClairePhila d26413113c Refs #27148 -- Fixed UUIDField.to_python(None) crash.
Regression in 2f9861d823.
2017-02-10 13:54:52 -05:00
ClairePhila edad02af06 Allow UUIDField to be None when deserializing 2017-02-10 17:26:02 +01:00
Claude Paroz c651331b34 Converted usage of ugettext* functions to their gettext* aliases
Thanks Tim Graham for the review.
2017-02-07 09:04:04 +01:00
Vytis Banaitis 8838d4dd49 Refs #23919 -- Replaced kwargs.pop() with keyword-only arguments. 2017-02-01 11:41:56 -05:00
Vytis Banaitis d1bab24e01 Refs #23919, #27778 -- Removed obsolete mentions of unicode. 2017-01-26 08:19:27 -05:00
chillaranand d6eaf7c018 Refs #23919 -- Replaced super(ClassName, self) with super(). 2017-01-25 12:23:46 -05:00
Claude Paroz 042b7350a0 Refs #23919 -- Removed unneeded str() calls 2017-01-20 14:13:55 +01:00
Claude Paroz dc8834cad4 Refs #23919 -- Removed unneeded force_str calls 2017-01-20 08:44:31 +01:00
Simon Charette 9695b14982 Refs #23919 -- Removed str() conversion of type and method __name__. 2017-01-19 11:31:07 -05:00
Simon Charette cecc079168 Refs #23919 -- Stopped inheriting from object to define new style classes. 2017-01-19 08:39:46 +01:00
Aymeric Augustin eb422e476f Refs #23919 -- Removed obsolete __ne__() methods.
__ne__() defaults to the opposite of __eq__() on Python 3
when it doesn't return NotImplemented.
2017-01-18 21:44:00 -05:00
Aymeric Augustin 3cc5f01d9b Refs #23919 -- Stopped using django.utils.lru_cache(). 2017-01-18 21:42:40 -05:00
Claude Paroz 7b2f2e74ad Refs #23919 -- Removed six.<various>_types usage
Thanks Tim Graham and Simon Charette for the reviews.
2017-01-18 20:18:46 +01:00
Claude Paroz c716fe8782 Refs #23919 -- Removed six.PY2/PY3 usage
Thanks Tim Graham for the review.
2017-01-18 16:21:28 +01:00
Claude Paroz f3c43ad1fd Refs #23919 -- Removed python_2_unicode_compatible decorator usage 2017-01-18 13:44:34 +01:00
Claude Paroz d7b9aaa366 Refs #23919 -- Removed encoding preambles and future imports 2017-01-18 09:55:19 +01:00
Tim Graham 631f4ab061 Removed Manager.use_for_related_fields and Meta.manager_inheritance_from_future.
Per deprecation timeline. Refs ed0ff913c6.
2017-01-17 20:52:04 -05:00
Tim Graham 0dfc5479a8 Refs #26058 -- Removed deprecated FileField.get_directory_name()/get_filename(). 2017-01-17 20:52:04 -05:00
Tim Graham 933dc62742 Refs #16508 -- Removed virtual aliases of "private fields".
Per deprecation timeline.
2017-01-17 20:52:03 -05:00