[Twisted-web] web2 response.setCookie and request.getCookie
shortcuts?
Aleksandar Erkalovic
aerkalov at mi2.hr
Thu Nov 17 05:23:26 MST 2005
:> >I'm still having fun with web2, it is such a huge improvment over
:> >twisted.web and I'm absolutely thrilled with it. However, I have
:> >a few suggestions:
:>
:> > 1. It would be supreme if render() and locateChild() just provided
:> > me the Request object; the incantation to ctx.locate() seems a
:> > tedious an unnecessary step.
i also noticed this talks about removing context from the web2, and
nevow. i dont know how much is this connected, but i would like to hear what
other people think about this.
currently i am working on one multilingual finance application (that somebody
else wrote and i have to maintain). it is one big beast that was working
in Woven and now is changed to work in Nevow. so obviously from the
start it is not designed in the best possible way.
it uses nevow.i18n and i18n uses context to store the information about
current language. and some of my renderers are using context to get
information about the language and blah blah.i am just interested,
the moment context goes away, where will this kind of information be
stored? i am aware it depends from application and design, but i would
like to hear some suggestions or something. for instance urls are:
/ngode/en/account/1021/report
/ngode/account/1021/report
/ngode/hr/account/1021/report
will i be forced to carry my language flag around in my data model and
learn my loaders and renderers to get from data model what template to
load or maybe you guys are thinking that Request object could be used
to carry this kind of information? so far context looked like a nice
place where to put it and data does not change (just representation)
according to the selected language.
aco
--
http://aco.mi2.hr/
More information about the Twisted-web
mailing list