How to make links to another page

33 views
Skip to first unread message

Stephen Hengeli

unread,
Feb 28, 2020, 1:12:12 AM2/28/20
to web2py-users
I know this is going to sound like a dumb question, but I am new to web2py and need to use it for my Capstone class.
I understand the modules and the controllers and views, but I am having trouble creating a link to a new html page and there doesn't seem to be a lot of 
information available online so I am asking here. 

What is happening is I can successfully call another controller, but all it does is show the dictionary values and page name. Since the test values being shown are correct, I know my module code is working and my controller index function is working properly. I simply cannot get it to show any of the HTML i have written. 

Is there something I am missing or is there a resource I am missing somewhere? 

Any help would be appreciated. 

villas

unread,
Feb 28, 2020, 3:30:58 PM2/28/20
to web2py-users
Maybe it is not finding the associated view?  Look at these two examples...

Controller:  myapp/controllers/default.py   function  def myfunct()
Uses this view file:  myapp/views/default/myfunct.html

Controller:  myapp/controllers/newcont.py   function  def anewfunc()
Uses this view file:  myapp/views/newcont/anewfunc.html

In other words,  make sure your view files are saved in the right place.
Reply all
Reply to author
Forward
0 new messages