Browse Source

Změna jmen uploadovaných souborů

export_seznamu_prednasek
Pavel "LEdoian" Turinsky 4 years ago
parent
commit
86311461c6
  1. 2
      seminar/models.py

2
seminar/models.py

@ -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)

Loading…
Cancel
Save