Korektury: odstraň diakritiku ze jména souboru
This commit is contained in:
		
							parent
							
								
									089ff4ff31
								
							
						
					
					
						commit
						a8a4364f60
					
				
					 2 changed files with 6 additions and 1 deletions
				
			
		|  | @ -10,10 +10,14 @@ from django.core.exceptions import ObjectDoesNotExist | |||
| import subprocess | ||||
| from reversion import revisions as reversion | ||||
| 
 | ||||
| from unidecode import unidecode | ||||
| 
 | ||||
| 
 | ||||
| # PrilohaReseni method | ||||
| def generate_filename(self, filename): | ||||
|     clean = filename.replace('/','-').replace('\0', '').replace(":","_") | ||||
|     clean = unidecode( | ||||
|         filename.replace('/', '-').replace('\0', '').replace(":", "_") | ||||
|     ) | ||||
|     fname = "%s_%s" % ( | ||||
|         timezone.now().strftime('%Y-%m-%d-%H_%M'), | ||||
|         clean) | ||||
|  |  | |||
|  | @ -8,6 +8,7 @@ pytz==2015.7 | |||
| six==1.10.0 | ||||
| pexpect==4.0.1 | ||||
| traitlets==4.0.0 | ||||
| Unidecode==0.4.19 | ||||
| 
 | ||||
| # Django and modules | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue
	
	 Matěj Kocián
						Matěj Kocián