#2160: [PATCH] Problems when importing SO model.py with no dburi set up
------------------------+---------------------------------------------------
Reporter: chrisz | Owner: faide
Type: defect | Status: new
Priority: normal | Milestone: 1.0.x bugfix
Component: TurboGears | Version: 1.0.8
Severity: normal | Keywords:
------------------------+---------------------------------------------------
You cannot import a model.py file for SQLObject that includes inheritance
(such as the one below) from outside TurboGears or when no dburi is set
up, as reported on the TG group
[http://groups.google.com/group/turbogears/browse_thread/thread/a7a230b1bc1ffa92
here]; you will get a 'No database configuration found!' error:
{{{
from sqlobject import SQLObject, StringCol
from turbogears.database import PackageHub
__connection__ = PackageHub('test')
class data(SQLObject):
item = StringCol()
class deleted_data(data):
time = DateTimeCol()
}}}
I have attached a simple fix that solves the problem (for an explanation,
see the discussion thread above). It should be applied to all TG 1.x
versions.
--
Ticket URL: <http://trac.turbogears.org/ticket/2160>
TurboGears <http://www.turbogears.org/>
TurboGears front-to-back web development
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "TurboGears Tickets" group.
This group is read-only. No posting by normal members allowed.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/turbogears-tickets?hl=en?hl=en
-~----------~----~----~----~------~----~------~--~---