On Feb 23, 2:27 pm, Philip Jenvey <[email protected]> wrote: > On Feb 23, 2009, at 10:58 AM, Chris Curvey wrote: > > > I put the setup_all in load_environment (in environment.py), and that > > seemed to do no harm. But I can't find a method called setup_config > > anywhere. > > websetup's setup_config changed to setup_app in 0.9.7. > > def setup_config(command, filename, section, vars) > --> > def setup_app(command, conf, vars): > > Either one will work, regardless of version >
Hmm. I still haven't solved this, and its becoming more pressing. If I run the script as delivered, I get the UnboundExecutionError. So I went into websetup.py, found the setup_app function, and added this to it: # create the tables if they are not there already from sqlalchemy import create_engine meta.metadata.bind = create_engine(conf['sqlalchemy.url']) meta.metadata.create_all(checkfirst=True) Now "paster setup-app development.ini" runs without errors (yay!) but it does not create my one new table (boo!). I even tried pulling out the "checkfirst" parameter, but that seems to make no difference. (Incidentally, I need to leave setup_all() in my __init__ file, because my model directory is not in the Pylons project tree -- it's somewhere else and imported by the pylons model/__init_) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~----------~----~----~----~------~----~------~--~---
