Hi,
I can't access to app configuration inside my command:
# -*- coding: utf-8 -*-
from gearbox.command import Command
from tg import config
class CrawlCommand(Command):
def take_action(self, parsed_args):
print(config.get('sqlalchemy.url'))
produce:
> gearbox crawl
None
I would like be able to read app config like in tgshell:
> gearbox tgshell
>>> from tg import config
>>> config.get('sqlalchemy.url')
'postgresql://pyjobs:pyjobs@localhost/pyjobs'
How to load environnement/config inside gearbox.command.Command ?
Thanks,
Bastien.
--
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/turbogears.
For more options, visit https://groups.google.com/d/optout.