My app has default routes; so I can't figure out why I can't import.

I created the app "mynewapp" as a new simple app; then copied over the
views + default models from the latest welcome app.

In the modules directory I put "foo_module.py", containing:
#!/usr/bin/env python
# coding: utf8

class Foo:
    def foo():
        return 'bar'

---

In controllers/mynewapp I put:

from applications.mynewapp.modules.foo_module  import Foo
# also tried
# from foo_module import Foo

And received this error

<type 'exceptions.ImportError'> No module named mynewapp.modules.foo_module

---

How do I import functions and/or classes from /modules to my controllers?

Thanks for all suggestions,

Alec Taylor

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to