fixup! fixup! fixup! WIP sortítko galerií
This commit is contained in:
		
							parent
							
								
									1d157e7e68
								
							
						
					
					
						commit
						2cbaee10aa
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		|  | @ -123,7 +123,7 @@ class Galerie(models.Model): | ||||||
| 				raise ValueError from e | 				raise ValueError from e | ||||||
| 
 | 
 | ||||||
| 			exif = obr.getexif() # Pokud tam není, tak si Pillow podle zdrojáků vyhaluzí prázdný. | 			exif = obr.getexif() # Pokud tam není, tak si Pillow podle zdrojáků vyhaluzí prázdný. | ||||||
| 			date_str = exif.get(ExifTags.DateTime, None) or exif.get(ExifTags.DateTimeOriginal, None) or exif.get(ExifTags.DateTimeDigitized, None) | 			date_str = exif.get(ExifTags.Base.DateTime, None) or exif.get(ExifTags.Base.DateTimeOriginal, None) or exif.get(ExifTags.Base.DateTimeDigitized, None) | ||||||
| 			if date_str is None: continue | 			if date_str is None: continue | ||||||
| 			dt = datetime.strptime(date_str, EXIF_DATETIME_FMT) | 			dt = datetime.strptime(date_str, EXIF_DATETIME_FMT) | ||||||
| 			poradi = int(dt.strftime("1%d%H%M%S")) | 			poradi = int(dt.strftime("1%d%H%M%S")) | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue
	
	 LEdoian
						LEdoian