[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GMG-Devel] How to specify an alternative data_basedir?

From: Mikhail T.
Subject: [GMG-Devel] How to specify an alternative data_basedir?
Date: Thu, 04 Feb 2016 23:45:42 -0500
User-agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0


I'd like the FreeBSD installation of MG to separate code and configuration files from data:
  • Code: where Python installs it (such as $PREFIX/lib/python2.7/site-packages/mediagoblin/)
  • Configuration: $PREFIX/etc/mediagoblin/
  • Data: /var/tmp/mediagoblin/ -- to be overwritten by user
Specifying an alternative data_basedir in $PREFIX/etc/mediagoblin/mediagoblin.ini is easy, but the paste.ini still refers to %(here)s for various subdirectories. Trying to refer to %(data_basedir)s results in an error:
ConfigParser.InterpolationMissingOptionError: Error in file /opt/etc/mediagoblin/paste.ini: Bad value substitution:
        section: [app:mediagoblin]
        option : /mgoblin_media
        key    : data_basedir
        rawval : %(data_basedir)s/user_dev/media/public
How do I specify the directory in one place -- whether that place is in paste.ini or mediagoblin.ini is less important, although the latter is, probably, preferable so that if one were to switch from paster to celery, the paths would remain.

Any suggestions? Thanks! Yours,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]