mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	[1.7.x] Fixed #23316 -- Added datetime.time serialization in migrations.
Backport of 11d9cbe2f4 from master
			
			
This commit is contained in:
		
				
					committed by
					
						 Tim Graham
						Tim Graham
					
				
			
			
				
	
			
			
			
						parent
						
							22a28dd8b0
						
					
				
				
					commit
					6e5e2b0e28
				
			| @@ -279,6 +279,10 @@ class MigrationWriter(object): | ||||
|             if isinstance(value, datetime_safe.date): | ||||
|                 value_repr = "datetime.%s" % value_repr | ||||
|             return value_repr, set(["import datetime"]) | ||||
|         # Times | ||||
|         elif isinstance(value, datetime.time): | ||||
|             value_repr = repr(value) | ||||
|             return value_repr, set(["import datetime"]) | ||||
|         # Settings references | ||||
|         elif isinstance(value, SettingsReference): | ||||
|             return "settings.%s" % value.setting_name, set(["from django.conf import settings"]) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user