- # the INRIA setup is with "http://manifold.pl.sophia.inria.fr:7080/"
-
- _config_parser = None
-
- # having grown tired of screwing up with git stashes
- # taking away my local config, we now more properly use
- # an external config file to override teh default
- @staticmethod
- def manifold_url ():
- if Config._config_parser:
- return Config._config_parser.get('manifold','url')
- config = RawConfigParser ()
- config.add_section('manifold')
- config.set ('manifold', 'url', Config.default_manifold_url)
- config.read (os.path.join(ROOT,'myslice/myslice.ini'))
- Config._config_parser=config
- return Config.manifold_url()
+ # the INRIA setup is with "https://manifold.pl.sophia.inria.fr:7080/"
+
+ default_manifold_admin_user = 'admin'
+ default_manifold_admin_password = 'demo'
+
+
+ def __init__ (self):
+ parser = RawConfigParser ()
+ parser.add_section('manifold')
+ parser.set ('manifold', 'url', Config.default_manifold_url)
+ parser.set ('manifold', 'admin_user', Config.default_manifold_admin_user)
+ parser.set ('manifold', 'admin_password', Config.default_manifold_admin_password)
+ parser.add_section('googlemap')
+ parser.set ('googlemap','api_key', None)
+ parser.read (os.path.join(ROOT,'myslice/myslice.ini'))
+ self.config_parser=parser
+
+ def manifold_url (self):
+ return self.config_parser.get('manifold','url')
+
+ def manifold_admin_user_password(self):
+ return (self.config_parser.get('manifold','admin_user'),
+ self.config_parser.get('manifold','admin_password'))
+
+ def googlemap_api_key (self):
+ return self.config_parser.get('googlemap','api_key')