Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 33 lines (24 sloc) 0.916 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
from pyramid.config import Configurator

def add_view(config):
    """ Add a view and a route to the ogcproxy view callable. The proxy
service is made available at ``/ogcproxy``.

Arguments:

* ``config``: the ``pyramid.config.Configurator`` object.
"""
    config.add_route('ogcproxy', '/ogcproxy')
    config.add_view('papyrus_ogcproxy.views:ogcproxy', route_name='ogcproxy')

def includeme(config):
    """ The callable making it possible to include papyrus_ogcproxy
in a Pyramid application.

Calling ``config.include(papyrus_ogcproxy)`` will result in this
callable being called.

Arguments:

* ``config``: the ``pyramid.config.Configurator`` object.
"""
    add_view(config)

def main(global_config, **settings):
    """ Return the Pyramid application.
"""
    config = Configurator(settings=settings)
    config.include(includeme)
    return config.make_wsgi_app()
Something went wrong with that request. Please try again.