yuhl wrote:
>> Not really. Your controller-classes should be about presentation logic you
>> don't need in the CLI.
>>     
> This is what I've done
> I've put the logic into a module named admin.py
> admin.py is also used as a CLI.
>
> But each time I use the DBSession within admin.py, I get a  :
> sqlalchemy.exc.UnboundExecutionError: Could not locate a bind
> configured on mapper Mapper|User|tg_user, SQL expression or this
> Session
>
> any idea on how I should do this.
>   
This posting describes how to create a CLI command with TurboGears 2.x
(sorry, have lost the original post, so don't know if you're on 2.x or not):

   
http://blog.vrplumber.com/index.php?/archives/2384-TurboGears-offline-processes-crons,-command-line-commands,-etc.html

we've got a ticket to include something similar to the module there in
TurboGears, as the setup involved is rather non-trivial and way beyond
what a new user should be expected to spelunk through the code-base to
figure out.

HTH,
Mike

-- 
________________________________________________
  Mike C. Fletcher
  Designer, VR Plumber, Coder
  http://www.vrplumber.com
  http://blog.vrplumber.com

--

You received this message because you are subscribed to the Google Groups 
"TurboGears" 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/turbogears?hl=en.


Reply via email to