source: cows/trunk/cows/pylons/config.py @ 4914

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/cows/trunk/cows/pylons/config.py@5132
Revision 4914, 631 bytes checked in by spascoe, 11 years ago (diff)

Made a global CSMLConnector instance with a list function. Configuring the CSML backend has moved to util.py. Calling this module will now be the responsibility of the Pylons app.

Line 
1# BSD Licence
2# Copyright (c) 2009, Science & Technology Facilities Council (STFC)
3# All rights reserved.
4#
5# See the LICENSE file in the source distribution of this software for
6# the full license text.
7
8"""
9Miscellaneous utility functions.
10
11"""
12
13import pylons
14
15def configCSML():
16    """Initialise the configuration of the CSML backend from pylons.config.
17
18    """
19    from cows.service.imps.csmlbackend.config import config
20    for k in pylons.config:
21        parts = k.split('.')
22        if parts[:2] == ['cows', 'csml']:
23            k2 = '.'.join(parts[2:])
24            config[k2] = pylons.config[k]
25
26
27                   
28   
Note: See TracBrowser for help on using the repository browser.