Changeset 3782
- Timestamp:
- 14/04/08 12:32:44 (13 years ago)
- Location:
- DPPP/kml/python/csml2kmlpylon
- Files:
-
- 2 added
- 10 deleted
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
DPPP/kml/python/csml2kmlpylon/csml2kmlpylon.egg-info/SOURCES.txt
r3718 r3782 1 1 MANIFEST.in 2 2 README.txt 3 deploy.ini 3 4 development.ini 4 5 setup.cfg … … 6 7 test.ini 7 8 csml2kmlpylon/__init__.py 9 csml2kmlpylon/__init__.pyc 8 10 csml2kmlpylon/websetup.py 9 11 csml2kmlpylon.egg-info/PKG-INFO … … 16 18 csml2kmlpylon.egg-info/top_level.txt 17 19 csml2kmlpylon/config/__init__.py 20 csml2kmlpylon/config/__init__.pyc 21 csml2kmlpylon/config/csml2kmlpylon.conf.xml 18 22 csml2kmlpylon/config/environment.py 23 csml2kmlpylon/config/environment.pyc 19 24 csml2kmlpylon/config/middleware.py 25 csml2kmlpylon/config/middleware.pyc 20 26 csml2kmlpylon/config/routing.py 27 csml2kmlpylon/config/routing.pyc 21 28 csml2kmlpylon/controllers/__init__.py 29 csml2kmlpylon/controllers/__init__.pyc 22 30 csml2kmlpylon/controllers/csmlGrapher.py 31 csml2kmlpylon/controllers/csmlGrapher.pyc 23 32 csml2kmlpylon/controllers/error.py 24 33 csml2kmlpylon/controllers/template.py 25 34 csml2kmlpylon/lib/__init__.py 35 csml2kmlpylon/lib/__init__.pyc 26 36 csml2kmlpylon/lib/app_globals.py 37 csml2kmlpylon/lib/app_globals.pyc 27 38 csml2kmlpylon/lib/base.py 28 39 csml2kmlpylon/lib/helpers.py 40 csml2kmlpylon/lib/helpers.pyc 29 41 csml2kmlpylon/model/__init__.py 30 csml2kmlpylon/public/ceh_ecn.kml31 42 csml2kmlpylon/public/index.html 32 csml2kmlpylon/public/midas_stations.kmz33 43 csml2kmlpylon/tests/__init__.py 34 44 csml2kmlpylon/tests/test_models.py 35 45 csml2kmlpylon/tests/functional/__init__.py 46 docs/index.txt -
DPPP/kml/python/csml2kmlpylon/csml2kmlpylon/config/csml2kmlpylon.conf.xml
r3713 r3782 2 2 <DisplayIntervalStart>2006-6-1</DisplayIntervalStart> 3 3 <DisplayIntervalEnd>2006-7-1</DisplayIntervalEnd> 4 <ServedFromURL>http://s uperglue.badc.rl.ac.uk:8084/csmlGrapher</ServedFromURL>4 <ServedFromURL>http://spellbound:8084/csmlGrapher</ServedFromURL> 5 5 <Dataset id="midas" name="MIDAS"> 6 6 <GeoServerURL>http://bond.badc.rl.ac.uk:8084/geoserver/wfs</GeoServerURL> -
DPPP/kml/python/csml2kmlpylon/csml2kmlpylon/config/middleware.py
r3633 r3782 12 12 13 13 from csml2kmlpylon.config.environment import load_environment 14 15 import authkit.authenticate 14 16 15 17 def make_app(global_conf, full_stack=True, **app_conf): … … 40 42 41 43 if asbool(full_stack): 44 # Do authentication 45 app = authkit.authenticate.middleware(app, app_conf) 46 42 47 # Handle Python exceptions 43 48 app = ErrorHandler(app, global_conf, error_template=error_template, … … 50 55 # app = ErrorDocuments(app, global_conf, mapper=error_mapper, **app_conf) 51 56 57 52 58 # Establish the Registry for this application 53 59 app = RegistryManager(app) -
DPPP/kml/python/csml2kmlpylon/csml2kmlpylon/controllers/csmlGrapher.py
r3727 r3782 20 20 from string import lower 21 21 22 # Security 23 from authkit.pylons_adaptors import authorize 24 from authkit.permissions import RemoteUser, ValidAuthKitUser 25 22 26 log = logging.getLogger(__name__) 23 27 … … 25 29 26 30 class Dataset: 27 '''31 """ 28 32 An auxiliary storage class describing a dataset of csml2kml.Station's; 29 33 this describes what URL the data is I{retrievable} from, as opposed to this class actually storing any data. 30 34 E.g. MIDAS and ECN are different datasets (each has a WFS URL from which it is being accessible). 31 '''35 """ 32 36 def __init__(self, id, name, geoServerUrl, datetimeQueryFormat, isCsmlLinkVisible): 33 37 self.id = id … … 38 42 39 43 def __call__(self, environ, start_response): 40 '''44 """ 41 45 Initialise the web service by overriding a method that always gets called upon controller construction. 42 46 More specifically, read in the config file. 43 '''47 """ 44 48 45 49 # The name of the config file is set in the server's "development.ini" file. … … 75 79 76 80 def _datetimeTo1Jan1970(self, datetime): 77 '''81 """ 78 82 Convert datetime to format a'la C{1-JAN-1970}. 79 83 @param datetime: The datetime to be converted. … … 81 85 @return: A string like "1-JAN-1970" or "31-MAR-2008". 82 86 @rtype: C{str} 83 '''87 """ 84 88 # Use format e.g. "1-JAN-1970" or "31-MAR-2008". 85 89 monthCodes = ['JAN', 'FEB', 'MAR', 'APR', 'MAY', 'JUN', 'JUL', 'AUG', 'SEP', 'OCT', 'NOV', 'DEC'] … … 163 167 return csmlPointSeriesFeature 164 168 169 @authorize(ValidAuthKitUser()) 165 170 def plot(self): 166 171 ''' … … 270 275 271 276 def _set_response(tempFile): 272 '''277 """ 273 278 Set the service's response to an image, containing image read from a temporary location. 274 279 @param tempFile: An object representing a temporary file 275 280 @type tempFile: C{tempfile.NamedTemporaryFile} 276 '''281 """ 277 282 img = Image.open(tempFile.name) 278 283 buf = StringIO() … … 306 311 tempFile = _plot_feature(csmlPointSeriesFeature, dataset) # plot the feature into a temporary file 307 312 _set_response(tempFile) # set the response as an image containing the plot 313 print '*** %s' % response.content_type 308 314 finally: 309 315 try: -
DPPP/kml/python/csml2kmlpylon/deploy.ini
r3757 r3782 22 22 beaker.session.key = csml2kmlpylon 23 23 beaker.session.secret = somesecret 24 authkit.setup.method = form, cookie 25 authkit.form.authenticate.user.data = visitor:open_sesame 26 authkit.cookie.secret = multiproceduralwikimashing 24 27 25 28 # The following is the location of the config file that is used to setup the csmlGrapher service -
DPPP/kml/python/csml2kmlpylon/development.ini
r3718 r3782 22 22 beaker.session.key = csml2kmlpylon 23 23 beaker.session.secret = somesecret 24 authkit.setup.method = form, cookie 25 authkit.form.authenticate.user.data = visitor:open_sesame 26 authkit.cookie.secret = multiproceduralwikimashing 24 27 25 28 # The following is the location of the config file that is used to setup the csmlGrapher service
Note: See TracChangeset
for help on using the changeset viewer.