예제 #1
0
from ferris.core import routing

from ferris.controllers.root import Root
from ferris.controllers.oauth import Oauth

routing.add(routing.Route('/admin', Root, handler_method='admin'))
routing.add(routing.Route('/error/<code>', Root, handler_method='error'))
routing.route_controller(Oauth)
예제 #2
0
from ferris.core import routing, plugins
from app.controllers.usuarios import Usuarios
import webapp2


class HomeHandler(webapp2.RequestHandler):
    def get(self):
    	self.response.headers['Access-Control-Allow-Origin'] = '*'
        self.response.write('This is the HomeHandler.')


routing.redirect('/', to='/home')

# Routes all App handlers
routing.auto_route()

routing.add(routing.Route('/home', HomeHandler))

# Default root route
#routing.default_root()
예제 #3
0
from ferris.core import routing

from ferris.controllers.root import Root
from ferris.controllers.oauth import Oauth

routing.add(routing.Route('/admin', Root, handler_method='admin'))
routing.route_controller(Oauth)
예제 #4
0
from ferris.core import routing, plugins
from app.controllers.usuarios import Usuarios
import webapp2


class HomeHandler(webapp2.RequestHandler):
    def get(self):
        self.response.headers['Access-Control-Allow-Origin'] = '*'
        self.response.write('This is the HomeHandler.')


routing.redirect('/', to='/home')

# Routes all App handlers
routing.auto_route()

routing.add(routing.Route('/home', HomeHandler))

# Default root route
#routing.default_root()