>
> But the problem is that the data entered from, say index() is not 
> available at db.py. Am I right?
> If a user enters entries to table "table_names", will db.py see them? Are 
> the data persistent?
>

Alan is suggesting that the index function would store the user input in a 
database table, and then the db.py model file would read that database 
table (on subsequent requests) and use the metadata stored there to 
generate the table definition for the user's table. This is one of three 
suggestions I made on SO: 
http://stackoverflow.com/questions/10317214/web2py-create-table-from-user-input/10318253#10318253.
 
Did you try any of those solutions?
 

> Also my understanding from reading the online book is that the model files 
> are run once when starting the application. Could you tell me how I can 
> make the for-loop run after each user enters a entry in the table?


No, model files are run on every request, not just upon starting the 
application (actually, there is no "starting the application" -- 
application code is simply run on each request, and only upon requests).

Anthony 

>

Reply via email to