Best way to display results on a new page?

52 views
Skip to first unread message

Reed Crowe

unread,
Jan 23, 2017, 4:53:07 PM1/23/17
to web2py-users
Seems like a simple thing.

I have a simple search form with three fields on it.

The information entered helps tailor the DB query.
I have it working where it displays the data on the same form page, but I want it to display on a separate page.

What is the best way to do this?
I have tried to use a redirect, but I can not seem to get it to parse the returned data and display it.
Is redirect the correct web2py way to do it or is there another method?

Obviously I could use Django or take the data and using a python function to parse the data and display it, but I am trying to learn web2py and so far I am struggling a little bit.

Any suggestions?

Jim S

unread,
Jan 23, 2017, 5:48:21 PM1/23/17
to web2py-users
I'd build the url using URL and then redirect to the controller page to build the results page.


-Jim

Dave S

unread,
Jan 23, 2017, 7:09:43 PM1/23/17
to web2py-users


On Monday, January 23, 2017 at 2:48:21 PM UTC-8, Jim S wrote:
I'd build the url using URL and then redirect to the controller page to build the results page.


-Jim

(To expand on this)
The post at
discusses a self-redirect after a form.process().accepted, but the idea is the same for going elsewhere.
See the second paragraph.

/dps

Dave S

unread,
Jan 24, 2017, 3:00:49 AM1/24/17
to web2py-users
On Monday, January 23, 2017 at 4:09:43 PM UTC-8, Dave S wrote:


On Monday, January 23, 2017 at 2:48:21 PM UTC-8, Jim S wrote:
I'd build the url using URL and then redirect to the controller page to build the results page.


-Jim

(To expand on this)
The post at
discusses a self-redirect after a form.process().accepted, but the idea is the same for going elsewhere.
See the second paragraph.

 
Even more expansion:   the book explicity talks about redirecting --

Anthony

unread,
Jan 24, 2017, 10:53:01 AM1/24/17
to web2py-users
Please show your code.
Reply all
Reply to author
Forward
0 new messages