ty very very much.
why oucldnt someone have said that before, pretty obvious thats what i
was looking for.
On 13 Maj, 01:08, "Yoan Blanc" <[EMAIL PROTECTED]> wrote:
> You're driving me nuts...
>
> test.py
>
> def GET(self):
> print render.main("", "")
>
> def POST(self):
> i = web.input()
> print render.main(i.target, i.source)
>
> templates/main.html
> $def with (source, target)
>
> <textarea name="source">$:source</textarea>
> <textarea name="target">$:target</textarea>
>
> Now, can you keep quiet for a while? Yelling around doesn't help
> people wishing to help you (from my POV at least).
>
> web.insert and web.update are DB-related. just RT(F)M:http://webpy.org/docs
>
> Cheers,
>
> -- Yoan
>
> On Mon, May 12, 2008 at 10:28 PM, globalrev <[EMAIL PROTECTED]> wrote:
>
> > seriously i dont get it. below is the html-file(it has divs and forms
> > but no table) and the webpy-code.
>
> > can anyone just write the code to take the i.source and display it in
> > the i.target?
>
> > when i press submit now it will print on another site if i do print
> > rob.encrypt(i.source).
> > i dont want site-change or -update.
>
> > just insert text into target-area.
>
> > this should be supereasy and probably is but i really cant figure it
> > out and it frustrates me beyond anything else.
>
> > i dont understand pseudocode and is obv incapable of getting the
> > web.insert to work so if someone could just write those few lines of
> > code and test if it works id be incredibly grateful.
>
> > import web
> > import rob
>
> > render = web.template.render('templates/')
>
> > urls = (
> > '/', 'main',
> > )
>
> > class main:
> > def GET(self):
> > print render.main()
>
> > def POST(self):
> > i = web.input()
> > #print rob.encrypt(i.source)
> > #i.target=i.source
> > #n = web.insert("target", i.source)
> > #n = web.update('target', int(input.post_id),
> > title=input.post_title, body=input.post_body)
> > #web.redirect('./')
>
> > web.webapi.internalerror = web.debugerror
> > if __name__ == "__main__": web.run(urls, globals())
>
> > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/
> > TR/html4/strict.dtd">
> > <html>
> > <head>
>
> > <meta http-equiv="Content-Type" content="text/html;charset=utf-8" >
>
> > <title>robber's language</title>
> > <style type="text/css">
> > <!--
> > body {
> > margin: 0px;
> > padding: 0px;
> > }
> > #header {
> > background: #FDD017;
> > width: 100%;
> > height: 10%;
> > font-size: xx-large;
> > text-align: center;
> > }
> > #content {
> > background: white;
> > float: right;
> > width: 100%;
> > height: 90%;
> > text-align: center;
> > }
> > a:link {color: black; }
> > a:visited {color: white; }
> > a:hover {color: black; }
> > a:active {color: black; }
> > -->
> > </style>
> > </head>
> > <body>
>
> > <div id="header">
> > <b>Robber's language encrypter/decrypter</b>
> > </div>
>
> > <div id="content">
> > <form method=post action="">
> > <div><textarea name="source" cols="60" rows="10"></textarea></
> > div>
> > <div><input type="submit" value="translate"></div>
> > <div><textarea name="target" cols="60" rows="10"></textarea></
> > div>
> > </form>
> > </div>
>
> > </body>
> > </html>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---