I try let end user create their table on fly , for example, in
default.py

I have 2 function

def somepage()
    if not db.has_key('sometable'):
        db.define_table('sometable', ....

    redurect(r-request, f='nextpage')



def nextpage()
    if not db.has_key('sometable'):
       showerror()



when user call somepage(), it do create a new table 'sometable' in
database, after redirect
to nextpage(),  'sometable' still in database,  but db.has_key
('sometable') retun false,

does anyone know what happen?


and if change nextpage to   db.has_key('db_py_table') ( db_py_table is
define model\db.py ) it retuen true.

Can anyone help to tell me how to code to  create table in controler
py and it can access by other function?

Thanks a lot.



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to