Změna jmen uploadovaných souborů

This commit is contained in:
Pavel "LEdoian" Turinsky 2020-12-02 00:56:15 +01:00
parent cea3eee7b5
commit 86311461c6

View file

@ -988,7 +988,7 @@ def aux_generate_filename(self, filename):
unidecode(filename.replace('/', '-').replace('\0', '')) unidecode(filename.replace('/', '-').replace('\0', ''))
) )
datedir = timezone.now().strftime('%Y-%m') datedir = timezone.now().strftime('%Y-%m')
fname = "{}_{}".format( fname = "{}/{}".format(
timezone.now().strftime('%Y-%m-%d-%H:%M'), timezone.now().strftime('%Y-%m-%d-%H:%M'),
clean) clean)
return os.path.join(datedir, fname) return os.path.join(datedir, fname)