tsume wrote:
> I created a test app so I could play with SQLObject. Everything went fine
> until I changed the page which was running fine already. The code added a
> person to the database. The problem occurs when I change the code. Unless
> I restart the server, the next query will print out the error below. I've
> attached my example code as well at the end of this post.

I assume you have deactivated caching by setting
CacheKidTemplates = CacheServletClasses = CacheServletInstances = False

This means the model will be reloaded whenever you change the template,
and SQLObject does not like reloading the model.

So you should define your database model in a different Python module, 
say Model.py which should live anywhere in your working dir. This makes 
a lot of sense anyway.

Then in the header of the template you do

<?python
from Model import Person
... other servlet specific initialization ...
?>

Now you can change your template code and see the changes immediately. 
If you change Model.py, then the AutoReload mechanism will reload 
Webware for you. Works perfectly well.

Hope that helps,
-- Chris

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to