From 016231a0f5a413ca7777e9e46f262b7c70e46d9b Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Sat, 15 Aug 2015 01:26:11 -0400 Subject: [PATCH] Use Python function to get OS default temp directory. --- mayan/apps/common/settings.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mayan/apps/common/settings.py b/mayan/apps/common/settings.py index 633bf70b85..fbf65c179d 100644 --- a/mayan/apps/common/settings.py +++ b/mayan/apps/common/settings.py @@ -1,15 +1,17 @@ from __future__ import unicode_literals +import tempfile + from django.utils.translation import ugettext_lazy as _ from smart_settings import Namespace namespace = Namespace(name='common', label=_('Common')) setting_temporary_directory = namespace.add_setting( - global_name='COMMON_TEMPORARY_DIRECTORY', default='/tmp', + global_name='COMMON_TEMPORARY_DIRECTORY', default=tempfile.gettempdir(), help_text=_('Temporary directory used site wide to store thumbnails, previews and temporary files. If none is specified, one will be created using tempfile.mkdtemp()'), is_path=True -) # TODO: get os default temp directory +) setting_shared_storage = namespace.add_setting( global_name='COMMON_SHARED_STORAGE', default='storage.backends.filebasedstorage.FileBasedStorage',