On Jan 21, 3:14 pm, "b-global.net" <bglobal...@yahoo.com.mx> wrote:
> Hi Massimo:
>
> Thank you for all your help!!!
>
> Now, I have other problem!!! When I modify the imported module, the
> application use the old module, then I read that I can use:
>
>  reload(module)
>
> But I received an error!!!
>
> this is my code:
>
> exec('from applications.blog.modules.modulotest2 import MyModulo')
> reload(MyModulo)
>
> This is the error:
>
>  reload(MyModulo)
> TypeError: reload() argument must be module
>

I think you need to do

exec('import applications.blog.modules.modulotest2 as modulotest2')
reload(modulotest2)

then use modulotest2.MyModulo

> Other question:
>
> I read that you must not use reload() in production, because will take
> more time to execute, I'm right?
>
> But, for example if I make a forum module and I imported to my
> application, and everything works fine, but then I update this forum
> module, what I can do to make my application use the updated module
> without reload?

The easy way is just to comment reload in production since you will
not be changing the code then.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to