I’m trying to import the “pretty” date module http://pypi.python.org/pypi/py-pretty in my web2py application. I unzipped, extracted init.py and renamed it to pretty.py and placed in:proj/modules. I am trying to import it using: local_import ('pretty', reload=True)
But, I get this error: ImportError: No module named proj.modules.pretty
How can I fix this?
local_importhas been deprecated. You should now be able to do:Also, note that web2py includes its own pretty date functionality: http://web2py.com/books/default/chapter/29/14#Pretty-dates