pyramid_decoy, a simple pyramid app, which solely purpose is to redirect traffic away to configured location, with hooks (in the future) to be able to plug in a tracking code.
After creating package on github, move to tracis-ci.org, and turn on ci builds for given package.
pyramid_decoy’s usage is pretty strightforward. It can work as a standalone app, or other pyramid’s app extension.
To run it as an extension, include pyramid_decoy either by configuration:
[app:main] # ... pyramid.includes = pyramid_decoy # ...
or within your project’s main method:
def main(global_config, **settings): """Build a Pyramid WSGI application.""" config = Configurator(settings=settings) return config.make_wsgi_app()
To run as a standalone app, use paste config containing these lines:
[app:main] use = egg:pyramid_decoy#decoy decoy.url = http://www.example.com/
At this moment, decoy supports only one url that it redirects to. To set it, use decoy.url setting in your app:
[app:main] #... decoy.url = http://www.example.com/ #...