mirror of
				https://github.com/django/django.git
				synced 2025-10-31 01:25:32 +00:00 
			
		
		
		
	Fixed #30446 -- Resolved Value.output_field for stdlib types.
This required implementing a limited form of dynamic dispatch to combine expressions with numerical output. Refs #26355 should eventually provide a better interface for that.
This commit is contained in:
		
				
					committed by
					
						 Mariusz Felisiak
						Mariusz Felisiak
					
				
			
			
				
	
			
			
			
						parent
						
							d08e6f55e3
						
					
				
				
					commit
					1e38f1191d
				
			| @@ -233,6 +233,15 @@ Models | ||||
| * The ``of`` argument of :meth:`.QuerySet.select_for_update()` is now allowed | ||||
|   on MySQL 8.0.1+. | ||||
|  | ||||
| * :class:`Value() <django.db.models.Value>` expression now | ||||
|   automatically resolves its ``output_field`` to the appropriate | ||||
|   :class:`Field <django.db.models.Field>` subclass based on the type of | ||||
|   it's provided ``value`` for :py:class:`bool`, :py:class:`bytes`, | ||||
|   :py:class:`float`, :py:class:`int`, :py:class:`str`, | ||||
|   :py:class:`datetime.date`, :py:class:`datetime.datetime`, | ||||
|   :py:class:`datetime.time`, :py:class:`datetime.timedelta`, | ||||
|   :py:class:`decimal.Decimal`, and :py:class:`uuid.UUID` instances. | ||||
|  | ||||
| Requests and Responses | ||||
| ~~~~~~~~~~~~~~~~~~~~~~ | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user