Merge pull request #11353 from kvuorine/fwknop-fixes
[feed/packages.git] / net / seafile-seahub / patches / 030-uci-conf.patch
1 --- a/seahub/settings.py
2 +++ b/seahub/settings.py
3 @@ -140,7 +140,7 @@ TEMPLATES = [
4 {
5 'BACKEND': 'django.template.backends.django.DjangoTemplates',
6 'DIRS': [
7 - os.path.join(PROJECT_ROOT, '../../seahub-data/custom/templates'),
8 + os.path.join(os.environ.get('SEAFILE_UCI_DATA_DIR', os.path.join(PROJECT_ROOT, '../..')), 'seahub-data/custom/templates'),
9 os.path.join(PROJECT_ROOT, 'seahub/templates'),
10 ],
11 'APP_DIRS': True,
12 @@ -633,7 +633,7 @@ CAPTCHA_IMAGE_SIZE = (90, 42)
13 ENABLE_THUMBNAIL = True
14
15 # Absolute filesystem path to the directory that will hold thumbnail files.
16 -SEAHUB_DATA_ROOT = os.path.join(PROJECT_ROOT, '../../seahub-data')
17 +SEAHUB_DATA_ROOT = os.path.join(os.environ.get('SEAFILE_UCI_DATA_DIR', os.path.join(PROJECT_ROOT, '../..')), 'seahub-data')
18 if os.path.exists(SEAHUB_DATA_ROOT):
19 THUMBNAIL_ROOT = os.path.join(SEAHUB_DATA_ROOT, 'thumbnail')
20 else:
21 @@ -829,7 +829,7 @@ except ImportError:
22 pass
23 else:
24 # In server release, sqlite3 db file is <topdir>/seahub.db
25 - DATABASES['default']['NAME'] = os.path.join(install_topdir, 'seahub.db')
26 + DATABASES['default']['NAME'] = os.path.join(os.environ.get('SEAFILE_UCI_DATA_DIR', install_topdir), 'seahub.db')
27
28 # In server release, gunicorn is used to deploy seahub
29 INSTALLED_APPS += ('gunicorn', )