'Add a handler to the pipeline used to initialize new documents.
Args:
handler (Handler) : a handler to process this Application'

def add(self, handler):

    self._handlers.append(handler)
    static_paths = set((h.static_path() for h in self.handlers))
    static_paths.discard(None)
    if (len(static_paths) > 1):
        raise RuntimeError(('More    than    one    static    path    requested    for    app:    %r' % list(static_paths)))
    elif (len(static_paths) == 1):
        self._static_path = static_paths.pop()
    else:
        self._static_path = None
