[mod_python] Mod_python and Javascript

Colin Bean ccbean at gmail.com
Mon Oct 16 13:45:28 EDT 2006


Hi Papanii,

First of all, the scope of my experience with this is hand-coding
javascript / ajax stuff and using it to call mod_python components
which I also wrote from scratch; I haven't used any of the ajax
frameworks out there.

There's lots of different ways to go about this -- for the basic
pages, you've got the option of using psp, publisher, or writing your
own custom handler.  You can also generate data for your ajax
components using any of these, and there's some libraries that can
help you format your output.  I like simplejson:

http://cheeseshop.python.org/pypi/simplejson

Which can serialize a python object into JSON (lightweight text
representation of a javascript object).  Not too terrible to do by
hand, but that's a quick and easy solution.

I don't know of any tutorials off the top of my head; once you're
familiar with mod_python and ajax, it should by pretty intuitive to
put them together.

Don't hesitate to ask more questions as you get into the various
mod_python handlers.

Colin

On 10/16/06, Papanii Okai <papanii.okai at gmail.com> wrote:
> Hi Guys,
>        I am just getting into mod_python and i have a couple of
> questions. I have successfully installed mod_python and Apache2 on my
> Intel-mac. I have been playing around with some of the simple examples
> in the documentation. However when i went onto the web there seems to be
> a limited amount of examples. What i am trying to do is create a website
> with mod_python, javaScript with a little bit of Ajax. I already have
> created some html pages and would love to integrate them all together.
> Does anyone know of any sites with good tutorials for this? I would be
> very grateful.
>
> Sincerely
> --Papanii
>
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://mailman.modpython.org/mailman/listinfo/mod_python
>


More information about the Mod_python mailing list