Fix obrazek_maly_tag kdyz neni zadny obrazek.
This commit is contained in:
		
							parent
							
								
									d099f70985
								
							
						
					
					
						commit
						2fc738ae74
					
				
					 1 changed files with 2 additions and 0 deletions
				
			
		|  | @ -69,6 +69,8 @@ class Obrazek(models.Model): | |||
| 		ordering = ['nazev'] | ||||
| 
 | ||||
| 	def obrazek_maly_tag(self): | ||||
| 		if not self.obrazek_maly: | ||||
| 			return '' | ||||
| 		return u'<img src="{}">'.format(self.obrazek_maly.url) | ||||
| 	obrazek_maly_tag.short_description = "Náhled" | ||||
| 	obrazek_maly_tag.allow_tags = True | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue