On Nov 11, 4:14 pm, Christoph Zwerschke <[EMAIL PROTECTED]> wrote:
> Gerry wrote:
> > I have in my controllers.py:
> > from model import *
> > from ctrls.studforms import StudentReportControllers
>
> > In the file ctrls/studforms.py, I have:
> > from model import *
>
> > class StudentReportControllers(controllers.RootController):
>
> > It looks like something doesn't like my importing model.py twice.
> > But how else do I access the objects in my model from the file in the
> > subdirectory?
>
> Gerry, it looks like you have two different model files, one in the
> project folder, and one in the ctrls subfolder, and in both of them you
> are defining the identity tables. You must use only one model file.
>
> -- Chris

Chris,

My mistake, I should have said:

In the file /home/jerry/tg/Reps/reps/ctrls/studforms.py, I have:
import sys
sys.path.append('/home/jerry/tg/Reps/reps')
from model import *

(and model.py is in /home/jerry/tg/Reps/reps)

So, I think it is the same model.py I am importing.

This is the first time with Python I have imported a package this way
and I copied the commands from another posting on this list.
Is there a better way to do this?

Thanks,

Jerry.


--~--~---------~--~----~------------~-------~--~----~
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