2 from ConfigParser import RawConfigParser
3 from myslice.settings import ROOT
5 # as this code suggests, you have the option to write myslice/myslice.ini
8 #url = http://manifold.pl.sophia.inria.fr:7080/
12 # the OpenLab-wide backend as managed by UPMC
13 # xxx production should probably use https of course
14 default_manifold_url = "http://test.myslice.info:7080/"
15 # the devel/unstable version runs on "http://dev.myslice.info:7080/"
16 # if you use a development backend running on this box, use "http://localhost:7080/"
17 # the INRIA setup is with "http://manifold.pl.sophia.inria.fr:7080/"
21 # having grown tired of screwing up with git stashes
22 # taking away my local config, we now more properly use
23 # an external config file to override teh default
26 if Config._config_parser:
27 return Config._config_parser.get('manifold','url')
28 config = RawConfigParser ()
29 config.add_section('manifold')
30 config.set ('manifold', 'url', Config.default_manifold_url)
31 config.read (os.path.join(ROOT,'myslice/myslice.ini'))
32 Config._config_parser=config
33 return Config.manifold_url()
35 # exporting these details to js
37 def manifold_js_export ():
38 return "var MANIFOLD_URL = '%s';\n"%Config.manifold_url();