Your approach is correct if it works for you.  The thing is, "import" 
does not reload a module if it has been loaded by the currently running 
process.  The code is stored in a cache.  That is why you need to 
restart web2py (the process).

The way I work with modules is, I develop all my code in my controller 
(or view in your case) and when I'm done, move it to a module.  There 
will be tweaks, just know that you need to restart web2py when you do 
them.  This is not so much a web2py thing as much as it is a Python thing.

-tim

José Deodoro de Oliveira Filho wrote:
> Hi,
>
> I want to call helper functions from the views, I want to keep it
> organized and put them in the modules dir, which is fine and works
> etc. But once I make a modification to the helpers I have to kill
> web2py and restart it because it seems it doesn't refresh the sources
> in there. What's the correct approach here ?
>
> Thank you,
>
> Deodoro Filho
>
> >
>   

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" 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/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

begin:vcard
fn:Timothy Farrell
n:Farrell;Timothy
org:Statewide General Insurance Agency;IT
adr:;;4501 East 31st Street;Tulsa;OK;74135;US
email;internet:[EMAIL PROTECTED]
title:Computer Guy
tel;work:(918)492-1446
url:www.swgen.com
version:2.1
end:vcard

Reply via email to