Remove the SITE_ROOT settings variable and use Django's MEDIA_ROOT instead.
By default MEDIA_ROOT will point to a new 'media' inside Mayan's main directory.
This commit is contained in:
@@ -13,6 +13,6 @@ register_settings(
|
||||
module=u'django_gpg.conf.settings',
|
||||
settings=[
|
||||
{'name': u'KEYSERVERS', 'global_name': u'SIGNATURES_KEYSERVERS', 'default': ['pool.sks-keyservers.net'], 'description': _(u'List of keyservers to be queried for unknown keys.')},
|
||||
{'name': u'GPG_HOME', 'global_name': u'SIGNATURES_GPG_HOME', 'default': os.path.join(settings.SITE_ROOT, u'gpg_home'), 'description': _(u'Home directory used to store keys as well as configuration files.')},
|
||||
{'name': u'GPG_HOME', 'global_name': u'SIGNATURES_GPG_HOME', 'default': os.path.join(settings.MEDIA_ROOT, u'gpg_home'), 'description': _(u'Home directory used to store keys as well as configuration files.')},
|
||||
]
|
||||
)
|
||||
|
||||
@@ -41,6 +41,6 @@ register_settings(
|
||||
{'name': u'ZOOM_MIN_LEVEL', 'global_name': u'DOCUMENTS_ZOOM_MIN_LEVEL', 'default': 50, 'description': _(u'Minimum amount in percent (%) to allow user to zoom out a document page interactively.')},
|
||||
{'name': u'ROTATION_STEP', 'global_name': u'DOCUMENTS_ROTATION_STEP', 'default': 90, 'description': _(u'Amount in degrees to rotate a document page per user interaction.')},
|
||||
#
|
||||
{'name': u'CACHE_PATH', 'global_name': u'DOCUMENTS_CACHE_PATH', 'default': os.path.join(settings.SITE_ROOT, 'image_cache'), 'exists': True},
|
||||
{'name': u'CACHE_PATH', 'global_name': u'DOCUMENTS_CACHE_PATH', 'default': os.path.join(settings.MEDIA_ROOT, 'image_cache'), 'exists': True},
|
||||
]
|
||||
)
|
||||
|
||||
@@ -120,7 +120,6 @@ class VirtualEnv(object):
|
||||
yield self.extract_dependency(item)
|
||||
|
||||
def __init__(self):
|
||||
self.requirements_file_path = os.path.join(settings.SITE_ROOT, 'requirements', 'production.txt')
|
||||
if not PIP:
|
||||
raise PIPNotFound
|
||||
|
||||
|
||||
@@ -12,6 +12,6 @@ register_settings(
|
||||
{'name': u'GRIDFS_HOST', 'global_name': u'STORAGE_GRIDFS_HOST', 'default': u'localhost'},
|
||||
{'name': u'GRIDFS_PORT', 'global_name': u'STORAGE_GRIDFS_PORT', 'default': 27017},
|
||||
{'name': u'GRIDFS_DATABASE_NAME', 'global_name': u'STORAGE_GRIDFS_DATABASE_NAME', 'default': u'document_storage'},
|
||||
{'name': u'FILESTORAGE_LOCATION', 'global_name': u'STORAGE_FILESTORAGE_LOCATION', 'default': os.path.join(settings.SITE_ROOT, u'document_storage'), 'exists': True},
|
||||
{'name': u'FILESTORAGE_LOCATION', 'global_name': u'STORAGE_FILESTORAGE_LOCATION', 'default': os.path.join(settings.MEDIA_ROOT, u'document_storage'), 'exists': True},
|
||||
]
|
||||
)
|
||||
|
||||
2
mayan/media/README
Normal file
2
mayan/media/README
Normal file
@@ -0,0 +1,2 @@
|
||||
User files such as: document_storage, image_cache, db.sqlite3 and gpg_home go here
|
||||
|
||||
@@ -14,7 +14,9 @@ import sys
|
||||
|
||||
_file_path = os.path.abspath(os.path.dirname(__file__)).split('/')
|
||||
|
||||
BASE_DIR = SITE_ROOT = '/'.join(_file_path[0:-2])
|
||||
BASE_DIR = '/'.join(_file_path[0:-2])
|
||||
|
||||
MEDIA_ROOT = os.path.join(BASE_DIR, 'mayan', 'media')
|
||||
|
||||
# Quick-start development settings - unsuitable for production
|
||||
# See https://docs.djangoproject.com/en/1.6/howto/deployment/checklist/
|
||||
@@ -118,7 +120,7 @@ WSGI_APPLICATION = 'mayan.wsgi.application'
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.sqlite3',
|
||||
'NAME': os.path.join(SITE_ROOT, 'db.sqlite3'),
|
||||
'NAME': os.path.join(MEDIA_ROOT, 'db.sqlite3'),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user