I have LOAD component in my application. I made changes in web2py/routes.py
file and made my application default application, 'default' controller and
'index' function as defaults. Also added function list of default.py
controller in routes.py to distinguish between args and function
name(https://groups.google.com/d/msg/web2py/yi5rPK4APKs/rVBg9AiShPUJ). Now
when I open my app (http://127.0.0.1:8000/ or
http://127.0.0.1:8000/test/default/index), load component div loads
complete app in it, and this goes in loop.
Here is routes.py and minimal code
#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.pydef 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}}
Screenshot:
<https://lh3.googleusercontent.com/-kzjMQDqkp5s/WHe9D_Hw-BI/AAAAAAAAh94/RpPPXJujFkoJK2IwMvhixF3Reo1Uh_vmACLcB/s1600/load.png>
Please help me to solve this issue.
Thank You
- Gaurav
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.