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