[Mailman-Developers] How to get started with the REST server(was Re: Hello!! Help Needed)
mk2s at digitalcommute.com
mk2s at digitalcommute.com
Fri May 2 04:21:40 CEST 2008
This is a quick response to "How do you get started with the
restserver?" question.
https://code.launchpad.net/~mk2s/mailman/restserver
All of this is very much work in progress, but server.py is probably
where you want to start. There isn't much there, mostly because the
routes package takes care of the disptach.
I run my server as follows:
$ cd ~/mailman22runtime
$ PYTHONPATH=. python Mailman/rest/server.py
listConroller.py is the only controller currently implemented it
responds to a get request like the following:
$ lynx http://localhost:8000/lists/makitest
where makitest is the name of my test list that already exists. The
response is a HTML representation of the attributes of the list.
it also responds to a request like:
lynx http://localhost:8000/lists/
with a list of all the lists
the controller uses the .html file as templates for returning HTML
representation responses. Currently I have the response hardwired to
HTML, but in theory the json representation should also work.
also see:
http://www.makotemplates.org/
http://routes.groovie.org/manual.html
Quoting aman parnami <amanparnami at gmail.com>:
> Hi Mike,
> I was able to get your code from launchpad after some manipulations
> and lots of patience. Now onwards downloads will be smooth for me.
>
> I just swept through the directory structure of restserver and got a
> little confused. It would be grateful if you could tell me the
> starting point and
> if possible (will be highly appreciated) the order in which files
> should be read to understand them better and sooner.
>
> Thanks,
> --
> AMAN PARNAMI
> CSE DEPTT
> Indian Institute of Technology Bombay
>
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
More information about the Mailman-Developers
mailing list