Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(7)  |  Call(0)  |  Derive(0)  |  Import(7)

        def expose(*channels, **config):
    def decorate(f):
        @handler(*channels, **config)
        def wrapper(self, event, *args, **kwargs):
            try:
                if not hasattr(self, "request"):
                    (self.request, self.response), args = args[:2], args[2:]
                    self.request.args = args
                    self.request.kwargs = kwargs
                    self.cookie = self.request.cookie
                    if hasattr(self.request, "session"):
                        self.session = self.request.session
                if not getattr(f, "event", False):
                    return f(self, *args, **kwargs)
                else:
                    return f(self, event, *args, **kwargs)
            finally:
                if hasattr(self, "request"):
                    del self.request
                    del self.response
                    del self.cookie
                if hasattr(self, "session"):
                    del self.session

        wrapper.args, wrapper.varargs, wrapper.varkw, wrapper.defaults = \
            getargspec(f)
        if wrapper.args and wrapper.args[0] == "self":
            del wrapper.args[0]
        wrapper.event = True

        return update_wrapper(wrapper, f)

    return decorate
        


src/c/i/circuits-3.0.0.dev/examples/web/basecontrollers.py   circuits(Download)
#!/usr/bin/env python
 
from circuits.web import Server
from circuits.web.controllers import expose, BaseController
 

src/c/o/cocy-0.1.12/cocy/upnp/adapters/adapter.py   cocy(Download)
from cocy.upnp import SSDP_DEVICE_SCHEMA, SSDP_SCHEMAS, UPNP_EVENT_NS,\
    UPNP_SERVICE_ID_PREFIX, SERVER_HELLO
from circuits.web.controllers import Controller, expose, BaseController
from cocy.misc import parseSoapRequest, splitQTag, buildSoapResponse
from cocy.upnp.device_server import UPnPError

src/c/o/cocy-0.1.12/cocy/upnp/service.py   cocy(Download)
.. codeauthor:: mnl
"""
from circuits.web.controllers import BaseController, expose
import os
from circuits_bricks.web import ScopedChannel

src/c/o/cocy-0.1.12/cocy/upnp/device_server.py   cocy(Download)
from circuits.web.servers import BaseServer
from circuits_bricks.web import ScopeDispatcher, ScopedChannel
from circuits.web.controllers import BaseController, expose
from circuits.core.events import Event
from circuits.core.utils import findroot, flatten

src/s/a/sahriswiki-0.8.1/sahriswiki/root.py   sahriswiki(Download)
 
from circuits.web.tools import check_auth, basic_auth
from circuits.web.controllers import expose, BaseController
 
import schema

src/c/i/circuits-bricks-0.3/tests/WebClient.py   circuits-bricks(Download)
from circuits.core.manager import Manager
from circuits.web.servers import BaseServer
from circuits.web.controllers import BaseController, expose
from circuits.web.dispatchers.dispatcher import Dispatcher
import time

src/c/i/circuits-bricks-0.3/tests/ScopeServers.py   circuits-bricks(Download)
"""
from circuits.web.servers import BaseServer
from circuits.web.controllers import BaseController, expose, Controller
from circuits.core.manager import Manager
from unittest import TestCase