Euphorbium
Euphorbium

Reputation: 1277

How should I pass and get data from the user?

I have a page, where a user gives some data in a simple form. This is posted to bottle, it does its magic and generates a lot more data. Then I need user input on selecting just some of the generated data, so I pass the relevant aspect of data to user and show it with a plot. Then a user chooses by clicking on a plot. When I have the users choice, I can resume working with data. But I don't want to pass all the generated data to the user, just to get the same data back, because the user should evaluate just one aspect of it, and there probably is some chance in loosing some data in the way.

How should I get the users evaluation without passing the data generated in step one to the user? I need to pass data from one @route to another, without it going to the user, is this possible?

Upvotes: 0

Views: 145

Answers (1)

XORcist
XORcist

Reputation: 4367

Since http is a stateless protocol, you would have to have some sort of session mechanism that persists the data server-side between two requests.

Bottle.py doesn't have it's own session management but they recommend using Beaker.

Upvotes: 1

Related Questions