diff --git a/printer/models.py b/printer/models.py index e64343b2..4bcb98e4 100644 --- a/printer/models.py +++ b/printer/models.py @@ -18,6 +18,8 @@ from re2o.mixins import RevMixin import users.models +import unidecode + from .validators import ( FileValidator, ) @@ -33,7 +35,6 @@ from .settings import ( PERFORATION_OPTIONS, ) -from .utils import user_printing_path import math diff --git a/printer/utils.py b/printer/utils.py index cfd6a26d..1c67897a 100644 --- a/printer/utils.py +++ b/printer/utils.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- import subprocess import os -import unidecode from django.template.loader import get_template from django.core.mail import EmailMessage @@ -12,15 +11,6 @@ from numpy.random import randint import datetime -def user_printing_path(instance, filename): - """ - Defines the path where will be uploaded the files - Currently MEDIA_ROOT/printings/user_/ - """ - # File will be uploaded to MEDIA_ROOT/printings/user_/ - return 'printings/user_{0}/{1}'.format(instance.user.id, unidecode.unidecode(filename)) - - def pdfinfo(file_path): """