mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	[3.0.x] Fixed #29823 -- Doc'd limitation of DecimalField on SQLite.
Backport of b8dff52f44 from master
			
			
This commit is contained in:
		
				
					committed by
					
						 Mariusz Felisiak
						Mariusz Felisiak
					
				
			
			
				
	
			
			
			
						parent
						
							e0bb9092d1
						
					
				
				
					commit
					c2057205d9
				
			| @@ -677,6 +677,18 @@ substring filtering. | |||||||
|  |  | ||||||
| .. _documented at sqlite.org: https://www.sqlite.org/faq.html#q18 | .. _documented at sqlite.org: https://www.sqlite.org/faq.html#q18 | ||||||
|  |  | ||||||
|  | .. _sqlite-decimal-handling: | ||||||
|  |  | ||||||
|  | Decimal handling | ||||||
|  | ---------------- | ||||||
|  |  | ||||||
|  | SQLite has no real decimal internal type. Decimal values are internally | ||||||
|  | converted to the ``REAL`` data type (8-byte IEEE floating point number), as | ||||||
|  | explained in the `SQLite datatypes documentation`__, so they don't support | ||||||
|  | correctly-rounded decimal floating point arithmetic. | ||||||
|  |  | ||||||
|  | __ https://www.sqlite.org/datatype3.html#storage_classes_and_datatypes | ||||||
|  |  | ||||||
| "Database is locked" errors | "Database is locked" errors | ||||||
| --------------------------- | --------------------------- | ||||||
|  |  | ||||||
|   | |||||||
| @@ -715,7 +715,9 @@ when :attr:`~django.forms.Field.localize` is ``False`` or | |||||||
|  |  | ||||||
|     For more information about the differences between the |     For more information about the differences between the | ||||||
|     :class:`FloatField` and :class:`DecimalField` classes, please |     :class:`FloatField` and :class:`DecimalField` classes, please | ||||||
|     see :ref:`FloatField vs. DecimalField <floatfield_vs_decimalfield>`. |     see :ref:`FloatField vs. DecimalField <floatfield_vs_decimalfield>`. You | ||||||
|  |     should also be aware of :ref:`SQLite limitations <sqlite-decimal-handling>` | ||||||
|  |     of decimal fields. | ||||||
|  |  | ||||||
| ``DurationField`` | ``DurationField`` | ||||||
| ----------------- | ----------------- | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user