Skip to content

Commit

Permalink
Make the catalog setting based on from STORAGE_ROOT
Browse files Browse the repository at this point in the history
We were doing that, but then if a specific config file overrode
STORAGE_ROOT, then the catalog configs would still be based on the
default STORAGE_ROOT.
  • Loading branch information
Mathieu Bridon committed Jul 7, 2016
1 parent 3daf4ae commit 33509c3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 0 additions & 2 deletions ideascube/conf/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,4 @@

SESSION_COOKIE_AGE = 60 * 60 # Members must be logged out after one hour
BACKUP_FORMAT = 'zip' # One of 'zip', 'tar', 'bztar', 'gztar'
CATALOG_CACHE_BASE_DIR = '/var/cache/ideascube/catalog'
CATALOG_STORAGE_BASE_DIR = os.path.join(STORAGE_ROOT, 'catalog')
TAGGIT_CASE_INSENSITIVE = True
6 changes: 6 additions & 0 deletions ideascube/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ def log(s):
BACKUPED_ROOT = ldict.get('BACKUPED_ROOT') or os.path.join(STORAGE_ROOT, 'main') # noqa
MEDIA_ROOT = ldict.get('MEDIA_ROOT') or os.path.join(BACKUPED_ROOT, 'media') # noqa
STATIC_ROOT = ldict.get('STATIC_ROOT') or os.path.join(STORAGE_ROOT, 'static') # noqa
CATALOG_CACHE_BASE_DIR = (
ldict.get('CATALOG_CACHE_BASE_DIR') or '/var/cache/ideascube/catalog')
CATALOG_STORAGE_BASE_DIR = (
ldict.get('CATALOG_STORAGE_BASE_DIR')
or os.path.join(BACKUPED_ROOT, 'catalog'))

if not getattr(ldict, 'DATABASES', None):
DATABASES = {
'default': {
Expand Down

0 comments on commit 33509c3

Please sign in to comment.