hi, I'm new to web programming and webpy (and Python pretty much) and
I can't figure out this problem.

It seems the GET() defined for my template file gets called multiple
times when I load the URL in the web browser, but only if one part of
my code changes (which I'll explain in a moment; link to complete code
at bottom).

My application basically is a function that reads a string from a text
file, processes the string, saves it back to the file, then returns
the processed string, Webpy passes that string to the html template.

When my code saves the string back to the file, running the webpy code
makes the string processing code run multiple times. If I don't save
the string, the webpy code just publishes the html as expected.

My code structure looks like this:

- project
    * string processing code function reads in a string, transforms,
saves it, then returns it
    * webpy code, imports string processing, runs processing function
when GET() is called for the template
    - templates
        * template html, takes string passed in from template render


The complete code is at http://python.pastebin.com/d60c687c4


Thanks for any help!

-- 
You received this message because you are subscribed to the Google Groups 
"web.py" 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/webpy?hl=en.

Reply via email to