[mod_python] Post of image data

liyangmin liyangmin at gmail.com
Mon May 5 10:52:31 EDT 2008


thanks for the reply.

if I have the psp file as below,named index.psp:

<html><body>
<h2><%= message %></h2>
</body></html>

and the index.py:

def index(req):
    vars={"message":"hello python"}
    return psp.PSP(req, "index.psp", vars=vars)

I can deal with this case: but how about this one,how can I fill the
form data in the response:

<html><body>
<h2><%= message %></h2>
<form action="index" method="POST">
<center><input name="title" type="text" value="" /></center>
<br />
<center><input name="button" type="submit" value=""/></center>
</form
</body></html>

thanks a lot







2008/5/5 Graham Dumpleton <graham.dumpleton at gmail.com>:

> Please use reply-all and keep discussion on mod_python list.
>
> Anyway, I don't understand what you are asking. Do you simply mean how
> do you return a custom response?
>
> Did you go through the other parts of the tutorial at:
>
>  http://webpython.codepoint.net/
>
> including the other bits about mod_python.publisher such as the hello
> world example, which showed how responses are returned?
>
> Graham
>
> 2008/5/5 liyangmin <liyangmin at gmail.com>:
> > thanks a lot .  it helps a lot .
> > I have another question as below:
> > using req.form.getfirst()  method I can  read form data from a  request.
> > but How can i change the from data and  response  to the user?
> >
> > for example : I am using the template:
> >
> > <form action="show" method="POST">
> > <center><input name="path_name" type="text" value=""/> </center>
> > <center><input name="show_button" type="submit" value=""/></center>
> >  </form
> >
> > 2008/4/29 Graham Dumpleton <graham.dumpleton at gmail.com>:
> >
> >
> > > You don't say whether you are using raw mod_python handlers or
> > > mod_python.publisher.
> > >
> > > For mod_python.publisher, see:
> > >
> > >  http://webpython.codepoint.net/mod_python_publisher_forms
> > >
> > > Graham
> > >
> > > 2008/4/29 Jon McKamey <jmcKamey at neatreceipts.com>:
> > >
> > >
> > >
> > > >
> > > >
> > > >
> > > >
> > > > Hey folks,
> > > >
> > > > I'm working on a project using mod_python, and for the most part I'm
> > pretty
> > > > happy with it, it rocks.  However I'm having some problems getting
> raw
> > data
> > > > via POST and a form.  The thread at
> > > >
> http://www.modpython.org/pipermail/mod_python/2007-December/024547.html
> > > > helped a lot, but I can't seem to get the last piece in place.
> > > >
> > > >
> > > >
> > > > If anyone can drop a simple example of an HTML page to go with the
> rest
> > of
> > > > that example, it would be a huge help.  I'm sure there is something
> > simple
> > > > with the HTML form ACTION or METHOD that I'm missing, but I just
> can't
> > get
> > > > an example to work.
> > > >
> > > >
> > > >
> > > > Thanks in advance for the help
> > > >
> > > >
> > > >
> > > > -jmck
> > > >
> > > >
> > > >
> > > >
> > > > _______________________________________________
> > > >  Mod_python mailing list
> > > >  Mod_python at modpython.org
> > > >  http://mailman.modpython.org/mailman/listinfo/mod_python
> > > >
> > > >
> > > _______________________________________________
> > > Mod_python mailing list
> > > Mod_python at modpython.org
> > > http://mailman.modpython.org/mailman/listinfo/mod_python
> > >
> >
> >
> >
> > --
> > Yangmin Li
> > SoftWare College of Buaa
> >
>



-- 
Yangmin Li
SoftWare College of Buaa
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mm_cfg_has_not_been_edited_to_set_host_domains/pipermail/mod_python/attachments/20080505/2fb3ddce/attachment.html


More information about the Mod_python mailing list