pngtile/application.py
changeset 152 7bd8d6062c9e
parent 146 0f2a918eb90a
child 164 e1e0c8099c8b
equal deleted inserted replaced
151:dfd8022d000e 152:7bd8d6062c9e
     1 from werkzeug import Request, Response, exceptions
     1 from werkzeug import Request, Response, exceptions
     2 from werkzeug.utils import html
     2 from werkzeug.utils import html
       
     3 import werkzeug.urls
     3 
     4 
     4 import pypngtile
     5 import pypngtile
     5 
     6 
     6 import os.path
     7 import os.path
       
     8 
       
     9 def url (server, *path, **args):
       
    10     """
       
    11         >>> url('http://foo/', 'bar, 'quux.png', x=5, y=2)
       
    12         'http://foo/bar/quux.png?x=5&y=2'
       
    13     """
       
    14 
       
    15     return werkzeug.urls.Href(server)(*path, **args)
     7 
    16 
     8 class BaseApplication (object):
    17 class BaseApplication (object):
     9     IMAGE_TYPES = (
    18     IMAGE_TYPES = (
    10         'png',
    19         'png',
    11     )
    20     )