But the "examples" application *does* contain two model files db.py
and images.py.
Markus
you use the same variable to store different SQLDB objects. For example:
--- model a.py ----
db=SQLDB(...)
db.define_table(....)
--- nodel b.py ----
db=SQLDB(....) ### WRONG
db.define_table(....)
---------
this is wrong because models are executed in alphabetical order in
the same restricted environment.
the posted examples work because I use two different names "db" and
"dba".
The following solutions are both acceptable
--- model a.py ----
db=SQLDB(...)
db.define_table(....)
--- nodel b.py ----
other_db=SQLDB(....) ### OK as long as db and other_db are not the
same DB
other_db.define_table(....)
---------
OR
--- model a.py ----
db=SQLDB(...)
db.define_table(....)
--- nodel b.py ----
# db=SQLDB(....)
db.define_table(....) ### this table will be stored in the same db as
the one in a.py
---------
If this is your problem this may have unpredictable effects on the
transaction mechanism and it may also explain your problem with the
appadmin (which I cannot reproduce yet). It will also cause a memory
leak.
Does this solve the problem? If not please send me you models.
Massimo
edit the appadmin.py file of your application and remove the lines:
if request.env.remote_addr!=request.env.http_host.split(':')[0]:
raise HTTP(400)
Let me know if this fixes the problem.
massimo