wsgisubdomain is a WSGI application dispatcher. A WSGI application is fetched based on a request’s target subdomain, creating one if needed.
wsgisubdomain supports Python 2.6, 2.7, 3.2, 3.3 and PyPy.
$ pip install wsgisubdomain
# app.wsgi
from wsgisubdomain import SubdomainDispatcher
from app import create_application
application = SubdomainDispatcher(create_application)
A WSGI application that gets or creates other WSGI applications based on the subdomain.
Adapted from: http://flask.pocoo.org/docs/patterns/appdispatch/#dispatch-by-subdomain
Parameters: | create_application – A function that accepts ‘subdomain’ as a keyword argument and returns a WSGI application. Subdomain will be either an empty string for the bare domain, None if the request is for an IP address, or a full subdomain (e.g. ‘www’ or ‘en.dl’) |
---|
WSGI application interface
Parameters: |
|
---|
x.__delattr__(‘name’) <==> del x.name
default object formatter
x.__getattribute__(‘name’) <==> x.name
x.__hash__() <==> hash(x)
helper for pickle
helper for pickle
x.__repr__() <==> repr(x)
x.__setattr__(‘name’, value) <==> x.name = value
size of object in memory, in bytes
x.__str__() <==> str(x)
Abstract classes can override this to customize issubclass().
This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).
list of weak references to the object (if defined)