|
@ -10,10 +10,14 @@ from django.core.exceptions import ObjectDoesNotExist |
|
|
import subprocess |
|
|
import subprocess |
|
|
from reversion import revisions as reversion |
|
|
from reversion import revisions as reversion |
|
|
|
|
|
|
|
|
|
|
|
from unidecode import unidecode |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# PrilohaReseni method |
|
|
# PrilohaReseni method |
|
|
def generate_filename(self, filename): |
|
|
def generate_filename(self, filename): |
|
|
clean = filename.replace('/','-').replace('\0', '').replace(":","_") |
|
|
clean = unidecode( |
|
|
|
|
|
filename.replace('/', '-').replace('\0', '').replace(":", "_") |
|
|
|
|
|
) |
|
|
fname = "%s_%s" % ( |
|
|
fname = "%s_%s" % ( |
|
|
timezone.now().strftime('%Y-%m-%d-%H_%M'), |
|
|
timezone.now().strftime('%Y-%m-%d-%H_%M'), |
|
|
clean) |
|
|
clean) |
|
|