What's in your config file for the database configuration?

On 2/15/06, Olli Wang <[EMAIL PROTECTED]> wrote:
>
> hi, i want to import model in my controller.py, but if i do this, i
> can't up cherrypy server.
> i tried to create a new project to find the cause. i just
> 1. add "import model" in controller
> 2. add below code to model.py
>       class User(TG_User):
>           #timezone = IntCol(default=8)
>           scheduleEntrys = MultipleJoin("ScheduleEntry")
>       class AllGroup(TG_Group):
>           pass
>       class Permission(TG_Permission):
>           pass
>
> and the server really can't up. i got a such traceback:
> Traceback (most recent call last):
>   File "E:\TurboGears\admi18n\start-admi18n.py", line 24, in ?
>     from admi18n.controllers import Root
>   File "E:\TurboGears\admi18n\admi18n\controllers.py", line 1, in ?
>     import model
>   File "E:\TurboGears\admi18n\admi18n\model.py", line 12, in ?
>     class User(TG_User):
>   File
> "c:\python24\lib\site-packages\sqlobject-0.7.1dev_r1588-py2.4.egg\sqlobje
> ct\declarative.py", line 108, in __new__
>     cls.__classinit__(cls, new_attrs)
>   File
> "c:\python24\lib\site-packages\sqlobject-0.7.1dev_r1588-py2.4.egg\sqlobje
> ct\main.py", line 748, in __classinit__
>     if not connection and not getattr(cls, '_connection', None):
>   File "turbogears\database.py", line 128, in __get__
>   File "turbogears\database.py", line 146, in set_hub
> KeyError: 'No database configuration found!'
>
> i add step2 to model.py because i want to customize identity. but in
> this test project, i even didn't turn on the identity yet. so any
> ideas? thanks.
>
>
>
>


--
Kevin Dangoor
Author of the Zesty News RSS newsreader

email: [EMAIL PROTECTED]
company: http://www.BlazingThings.com
blog: http://www.BlueSkyOnMars.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
-~----------~----~----~----~------~----~------~--~---

Reply via email to