#routes.py routers = dict( # base router BASE=dict( default_application='test', default_controller = 'default', default_function = 'index', functions = ['index', 'user', 'download', 'call', 'test_load'], ), )
# default.py def index(): return dict(message=T('Welcome to web2py!')) def test_load(): return dict(message=T('This is sample component'))
# Views <!--index.html--> {{extend 'layout.html'}} <h2>{{=message}}</h2> {{=LOAD('default','test_load.load',ajax=True)}} <!--test_load.load--> {{=message}}
functions = ['index', 'user', 'download', 'call', 'test_load']
functions = ['index', 'user', 'download', 'call', 'test_load.load']
functions = ['myfunc', 'myfunc.load', 'myfunc.json', 'myfunc.xml']
Now my app is working without any issues, but i am still not able to access admin (http://127.0.0.1:8000/admin/).
127.0.0.1 redirected you too many times.
routers = dict(
BASE=dict(
default_application='test')
),
test=dict(
default_controller = 'default',
default_function = 'index',
functions = ['index', 'user', 'download', 'call', 'test_load.load']
)
)