Hi all! I'm very new to pylons (couple of days off and
on), and have
run into a bit of a problem.
I'm attempting to use a myghty module component via
`Component Call
With Content' . The component call looks something like
this ->
<&| order:formfill, defaults=defaults, errors=errors
&>
... some stuff ...
</&>
But I get an error:
Error: Error(ImportError): No module named order
Well, I wanted to stick the `formfill' function inside the
controller
that is actually handling the order form. So, I did just
that .
But, pylons can't find the order module and I think it is
because my
sys.path is screwed up. Below is the sys.path entry that I
think is
causing the problem:
'C:\\cygwin\\tmp\\pylons-sandbox\\helloworld\\hel
loworldC:\\cygwin\\tmp\\pylons-sandbox\\helloworld\
\helloworld/controllers'
I think it should read:
'C:\\cygwin\\tmp\\pylons-sandbox\\helloworld\\hel
loworld/controllers'
And this is the line in my routing.py that is setting this
up -
map = Mapper(directory = root_path + '/controllers')
I just don't understand how the path is getting screwed up.
If I
can't figure it out, I can always stick it in my project's
`lib'
directory, which shows up in sys.path correctly. But, I'd
rather avoid
that if possible. Another alternative is just to use the
`project'
package, to drill down to my controller -
`helloworld.controllers.order' But at this point, I'm
wondering if
I've screwed up my configuration somehow, and I don't
realize it.
Any ideas?
jw
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "pylons-discuss" group.
To post to this group, send email to pylons-discuss googlegroups.com
To unsubscribe from this group, send email to
pylons-discuss-unsubscribe googlegroups.com
For more options, visit this group at http://
groups.google.com/group/pylons-discuss
-~----------~----~----~----~------~----~------~--~---
|