Hello,
My controllers.py is getting out of hand so I wanted to split it up.
I am using TG 1.04b2 with SA and sqlite.
I included identity management when I ran quickstart.
Before splitting up the file, everything was working fine.
I created a directory /ctrls in my controllers.py directory and put
file termctrls.py in there with the following class definition:
class TermControllers(controllers.Controller):
I then import this class in my controllers.py and hope to access the
methods defined there.
The imports at the top of termctrls.py are as follows:
import turbogears, sys
from turbogears import controllers, expose, flash
sys.path.append('/home/jerry/tg/Reps/reps')
from model import *
When I start my app, the 'from model import *' line is giving the
following error:
File "/usr/lib/python2.5/site-packages/SQLAlchemy-0.4.0-py2.5.egg/
sqlalchemy/schema.py", line 99, in __call__
raise exceptions.ArgumentError("Table '%s' is already defined for
this MetaData instance." % key)
sqlalchemy.exceptions.ArgumentError: Table 'visit' is already defined
for this MetaData instance.
If I remove the 'from model import *', the app runs but I don't have
access to the objects in my model.
This post:
http://groups.google.com/group/turbogears/browse_thread/thread/228e9e9f5e959cec/7b58586d838c4a32?lnk=gst&q=%27visit%27+is+already+defined+for+this+#7b58586d838c4a32
seems to share the same problem but I do not understand the
resolution.
Any ideas on how I can get around this?
Thanks,
Gerry.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---