mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	Used LogEntry methods to check LogEntry action_flag in __str__
This commit is contained in:
		
				
					committed by
					
						 Tim Graham
						Tim Graham
					
				
			
			
				
	
			
			
			
						parent
						
							756a727252
						
					
				
				
					commit
					34b6b89bd2
				
			| @@ -46,14 +46,14 @@ class LogEntry(models.Model): | ||||
|         return smart_text(self.action_time) | ||||
|  | ||||
|     def __str__(self): | ||||
|         if self.action_flag == ADDITION: | ||||
|         if self.is_addition(): | ||||
|             return ugettext('Added "%(object)s".') % {'object': self.object_repr} | ||||
|         elif self.action_flag == CHANGE: | ||||
|         elif self.is_change(): | ||||
|             return ugettext('Changed "%(object)s" - %(changes)s') % { | ||||
|                 'object': self.object_repr, | ||||
|                 'changes': self.change_message, | ||||
|             } | ||||
|         elif self.action_flag == DELETION: | ||||
|         elif self.is_deletion(): | ||||
|             return ugettext('Deleted "%(object)s."') % {'object': self.object_repr} | ||||
|  | ||||
|         return ugettext('LogEntry Object') | ||||
|   | ||||
		Reference in New Issue
	
	Block a user