mirror of
				https://github.com/django/django.git
				synced 2025-11-03 21:25:09 +00:00 
			
		
		
		
	Doc'd how ModelAdmin.list_display uses short_description.
This commit is contained in:
		
							parent
							
								
									986c7d522a
								
							
						
					
					
						commit
						8ab8a8910c
					
				
					 1 changed files with 4 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -641,6 +641,10 @@ subclass::
 | 
			
		|||
          :func:`~django.utils.html.format_html_join`, or
 | 
			
		||||
          :func:`~django.utils.safestring.mark_safe` instead.
 | 
			
		||||
 | 
			
		||||
    * As some examples have already demonstrated, when using a callable, a
 | 
			
		||||
      model method, or a ``ModelAdmin`` method, you can customize the column's
 | 
			
		||||
      title by adding a ``short_description`` attribute to the callable.
 | 
			
		||||
 | 
			
		||||
    * If the value of a field is ``None``, an empty string, or an iterable
 | 
			
		||||
      without elements, Django will display ``-`` (a dash). You can override
 | 
			
		||||
      this with :attr:`AdminSite.empty_value_display`::
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue