building a web interface
joralemonshelly at gmail.com
Thu Nov 25 21:18:33 CET 2010
Will take a look after stuffing myself with turkey today (am in the
US, where we give thanks by eating everything in sight). Thanks,
Wait, did I just say "thanks"? Must go eat pie.
On Nov 25, 12:36 am, Alice Bevan–McGregor <al... at gothcandy.com> wrote:
> I'm mildly biased, being the author of the framework, but I can highly
> recommend WebCore for rapid prototyping of web applications; it has
> templating via numerous template engines, excellent JSON (AJAJ)
> support, and support for database back-ends via SQLAlchemy. It also
> has session support baked-in via a project called Beaker.
> Documentation is fairly complete, and I can be found camping in the
> #webcore IRC channel on irc.freenode.net at strange hours.
> If you can write a class, you can have a fully operational web
> application in a single file of ~8 lines or so. (Or you can create a
> complete easy-installable Python package with multiple modules.)
> For information, see:http://www.web-core.org/
> As an interactive-fiction example:
> class RootController(web.core.Controller):
> def index(self):
> session = db.Session().save()
> return './templates/main.html', dict(session=session.id)
> def execute(self, session, statement):
> """Load our session and pass the input off to our interactive
> fiction library of choice. Return the result if all went well."""
> session = db.Session.get(session)
> result = myiflib.execute(session, statement)
> except myiflib.ParseError:
> return 'json:', dict(status="failure", message="Error...")
> return 'json:', dict(status="success", message=result)
> — Alice.
More information about the Python-list