[Twisted-web] Re: Introduction, newbie confusion plus an offer

lloyd at paisite.com lloyd at paisite.com
Thu Jul 7 09:50:02 MDT 2005


Hello,

To Ed Suominen:

Many thanks for your response.

I'd very much appreciate your help.

I am interested in Nevow, but like one of the other posters I'm confused
about where Twisted leaves off and where Nevow begins. This is only one of
many duh kind of questions I'd like to try to clear up.

My personal goal in all this is to re-write a ColdFusion application in
Python -- and improve it whereever possible. An example of the kind of
sites I want the new Python site to support support can be found at
http://www.luxexecutivesummit.com.

I'm after:
-- Scalability
-- Modularity
-- Rapid form-based site development
-- Efficient form-based site maintenance
-- Ability to plug in a rich variety of dynamic applications

But I recognize that you have to walk before you run. So my first
milestone will be to bring up the simplest web-server in the world. I know
it's in the present documentation, but I haven't quite figured it out yet.
I did get a couple of the Twisted examples working, however. My second
goal is to make the site data-driven. My third goal is to tighten it up
into an efficient, secure, flexible foundation that I and others can build
on.

My assumption is that if I, coming naively from a different technology,
have questions, others will too. If I can stumble through to answers and
help in whatever way to improve the documentation, then it'll be easier
for others.

More in following posts.

Best wishes,

Lloyd






>
> Today's Topics:
>
>    1. Re: Introduction, newbie confusion plus an offer (Matt Goodall)
>    2. Re: Introduction, newbie confusion plus an offer
>       (Uwe (Peter) Feldtmann)
>    3. Re: Introduction, newbie confusion plus an offer (Matt Goodall)
>    4. XML RPC authentication (Md Moin)
>    5. how are solving the calls to the children in nevow?
>       (Alberto Trujillo)
>    6. Re: Re: How work formless? (weeti)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Thu, 07 Jul 2005 11:03:21 +0100
> From: Matt Goodall <matt at pollenation.net>
> Subject: Re: [Twisted-web] Introduction, newbie confusion plus an
> 	offer
> To: "Discussion of twisted.web, Nevow,	and Woven"
> 	<twisted-web at twistedmatrix.com>
> Message-ID: <42CCFDE9.60701 at pollenation.net>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Uwe (Peter) Feldtmann wrote:
>> Can someone tell me where Nevow starts and where Twisted ends?  I think
>> Nevow needs Twisted but where is the development source held? Is it at
>> nevow.com divmod.org or in the Twisted source tree?
>
> Nevow code is at divmod.org. Twisted code is at twistedmatrix.com.
>
> Strictly speaking, Nevow doesn't need Twisted or rather, Nevow should be
> able to function without Twisted. However, there are twisted imports and
> a few Twisted-specific bits of code in Nevow.
>
> To be honest, I'm not sure if anyone is that interested in *completely*
> separating Nevow from Twisted. You can use Nevow outside of a Twisted
> event loop anyway.
>
> Note that some of the Nevow concepts are moving back into twisted.web2.
> At some point Nevow will start using t.web2 and, hopefully, we'll be
> able to remove (with backwards compatability) module from Nevow and rely
> on the t.web2 equivalents.
>
> Hope that helps.
>
> - Matt
>
>>
>> Thanks in advance.
>>
>> Ed Suominen wrote:
>>
>>> Lloyd, as a fairly experienced Nevow user who has gone through the same
>>> frustrations, I'll gladly help to the extent what you're writing about
>>> applies to Nevow. I understand that Twisted.web2 is more like Nevow
>>> than
>>> Twisted.web, so that may make sense. (Actually, you may want to use
>>> Nevow -- check it out at http://nevow.org/.)
>>> Contact me directly if interested. Also, don't forget the #twisted.web
>>> channel on the Freenode IRC server, which is an excellent real-time
>>> resource that has helped me a great deal with questions.
>>>
>>> Best regards,
>>> Ed Suominen
>>>
>>> On Wed, 2005-07-06 at 14:33 -0400, lloyd at paisite.com wrote:
>>>
>>>> Hello,
>>>>
>>>> I'm Lloyd, I'm baffled, and I'd like to offer my modest talents to
>>>> help
>>>> others like me come up to speed with Twisted.web in record time.
>>>>
>>>> I've been looking for a way to bring a large ColdFusion application
>>>> over
>>>> to Python. Twisted.web looks to offer all that I could wish for and
>>>> more.
>>>> The work to date is awe-inspiring. But... the documentation,
>>>> well-intentioned as it is, and much more ample than in many Open
>>>> Source
>>>> projects, truly baffles me.
>>>>
>>>> I'm first to admit my limitations: I'm still in the early learning
>>>> stages
>>>> of Python; I understand OO conceptually, but have little experience
>>>> writing or reading OO code; and, approaching the golden years,
>>>> undoubtably
>>>> have far fewer functioning neurons than most of the subscribers to
>>>> this
>>>> list, much less the brilliant young turks who have created the Twisted
>>>> framework.
>>>>
>>>> But, browsing through the archives, it's clear that I am not alone in
>>>> my
>>>> confusion.
>>>>
>>>> So, I'd like to make a proposal:
>>>>
>>>> I have many years of writing and editing experience. Back in the days
>>>> when
>>>> personal computers were still connected to audio cassette recorders,
>>>> and I
>>>> was as excited but unenlightened about PCs as I am now about Twisted,
>>>> I
>>>> contributed three well-received articles to Personal Computing
>>>> magazine
>>>> under the name Techo Turkey. These helped readers hook up IBM
>>>> Selectric
>>>> Terminals to their new PCs, create a computer-controlled haunted
>>>> house for
>>>> Halloween, and set up a computer-controlled home security system.
>>>>
>>>> I would like now to offer to write some supplementary documentation
>>>> for
>>>> Twisted.web aimed at turkeys like me -- the really really basic stuff
>>>> plus
>>>> sure-to-work examples that can bring even Mickey-the-Dunce to
>>>> sufficient
>>>> level of understanding that he can participate creatively in the
>>>> Twisted
>>>> community.
>>>>
>>>> The catch: I need knowledgeable folks willing to answer my many many
>>>> stupid questions like, once you've installed Twisted from, say,
>>>> Debian,
>>>> where should what files go and how should permissions be defined?
>>>> Undoubtably these generous mentors would also need to critique my
>>>> newbie
>>>> code and perhaps, even, submit examples of their own. Who know, maybe
>>>> we
>>>> could even get a book out of it.
>>>>
>>>> Any takers?
>>>>
>>>> Best wishes,
>>>>
>>>> Lloyd
>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Twisted-web mailing list
>>> Twisted-web at twistedmatrix.com
>>> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web
>>
>>
>> _______________________________________________
>> Twisted-web mailing list
>> Twisted-web at twistedmatrix.com
>> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web
>
> --
>       __
>      /  \__     Matt Goodall, Pollenation Internet Ltd
>      \__/  \    w: http://www.pollenation.net
>    __/  \__/    e: matt at pollenation.net
>   /  \__/  \    t: +44 (0)113 2252500
>   \__/  \__/
>   /  \          Any views expressed are my own and do not necessarily
>   \__/          reflect the views of my employer.
>
>
>
> ------------------------------
>
> Message: 2
> Date: Thu, 07 Jul 2005 21:04:37 +1000
> From: "Uwe (Peter) Feldtmann" <uwe at microshare.com.au>
> Subject: Re: [Twisted-web] Introduction, newbie confusion plus an
> 	offer
> To: "Discussion of twisted.web, Nevow,	and Woven"
> 	<twisted-web at twistedmatrix.com>
> Message-ID: <42CD0C45.2020903 at microshare.com.au>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Thank you. My confusion came from being on the twisted and nevow lists.
>
> Should we discuss nevow here or on divmod?
>
> Matt Goodall wrote:
>> Uwe (Peter) Feldtmann wrote:
>>
>>> Can someone tell me where Nevow starts and where Twisted ends?  I
>>> think Nevow needs Twisted but where is the development source held? Is
>>> it at nevow.com divmod.org or in the Twisted source tree?
>>
>>
>> Nevow code is at divmod.org. Twisted code is at twistedmatrix.com.
>>
>> Strictly speaking, Nevow doesn't need Twisted or rather, Nevow should be
>> able to function without Twisted. However, there are twisted imports and
>> a few Twisted-specific bits of code in Nevow.
>>
>> To be honest, I'm not sure if anyone is that interested in *completely*
>> separating Nevow from Twisted. You can use Nevow outside of a Twisted
>> event loop anyway.
>>
>> Note that some of the Nevow concepts are moving back into twisted.web2.
>> At some point Nevow will start using t.web2 and, hopefully, we'll be
>> able to remove (with backwards compatability) module from Nevow and rely
>> on the t.web2 equivalents.
>>
>> Hope that helps.
>>
>> - Matt
>>
>>>
>>> Thanks in advance.
>>>
>>> Ed Suominen wrote:
>>>
>>>> Lloyd, as a fairly experienced Nevow user who has gone through the
>>>> same
>>>> frustrations, I'll gladly help to the extent what you're writing about
>>>> applies to Nevow. I understand that Twisted.web2 is more like Nevow
>>>> than
>>>> Twisted.web, so that may make sense. (Actually, you may want to use
>>>> Nevow -- check it out at http://nevow.org/.)
>>>> Contact me directly if interested. Also, don't forget the #twisted.web
>>>> channel on the Freenode IRC server, which is an excellent real-time
>>>> resource that has helped me a great deal with questions.
>>>>
>>>> Best regards,
>>>> Ed Suominen
>>>>
>>>> On Wed, 2005-07-06 at 14:33 -0400, lloyd at paisite.com wrote:
>>>>
>>>>> Hello,
>>>>>
>>>>> I'm Lloyd, I'm baffled, and I'd like to offer my modest talents to
>>>>> help
>>>>> others like me come up to speed with Twisted.web in record time.
>>>>>
>>>>> I've been looking for a way to bring a large ColdFusion application
>>>>> over
>>>>> to Python. Twisted.web looks to offer all that I could wish for and
>>>>> more.
>>>>> The work to date is awe-inspiring. But... the documentation,
>>>>> well-intentioned as it is, and much more ample than in many Open
>>>>> Source
>>>>> projects, truly baffles me.
>>>>>
>>>>> I'm first to admit my limitations: I'm still in the early learning
>>>>> stages
>>>>> of Python; I understand OO conceptually, but have little experience
>>>>> writing or reading OO code; and, approaching the golden years,
>>>>> undoubtably
>>>>> have far fewer functioning neurons than most of the subscribers to
>>>>> this
>>>>> list, much less the brilliant young turks who have created the
>>>>> Twisted
>>>>> framework.
>>>>>
>>>>> But, browsing through the archives, it's clear that I am not alone
>>>>> in my
>>>>> confusion.
>>>>>
>>>>> So, I'd like to make a proposal:
>>>>>
>>>>> I have many years of writing and editing experience. Back in the
>>>>> days when
>>>>> personal computers were still connected to audio cassette recorders,
>>>>> and I
>>>>> was as excited but unenlightened about PCs as I am now about Twisted,
>>>>> I
>>>>> contributed three well-received articles to Personal Computing
>>>>> magazine
>>>>> under the name Techo Turkey. These helped readers hook up IBM
>>>>> Selectric
>>>>> Terminals to their new PCs, create a computer-controlled haunted
>>>>> house for
>>>>> Halloween, and set up a computer-controlled home security system.
>>>>>
>>>>> I would like now to offer to write some supplementary documentation
>>>>> for
>>>>> Twisted.web aimed at turkeys like me -- the really really basic
>>>>> stuff plus
>>>>> sure-to-work examples that can bring even Mickey-the-Dunce to
>>>>> sufficient
>>>>> level of understanding that he can participate creatively in the
>>>>> Twisted
>>>>> community.
>>>>>
>>>>> The catch: I need knowledgeable folks willing to answer my many many
>>>>> stupid questions like, once you've installed Twisted from, say,
>>>>> Debian,
>>>>> where should what files go and how should permissions be defined?
>>>>> Undoubtably these generous mentors would also need to critique my
>>>>> newbie
>>>>> code and perhaps, even, submit examples of their own. Who know,
>>>>> maybe we
>>>>> could even get a book out of it.
>>>>>
>>>>> Any takers?
>>>>>
>>>>> Best wishes,
>>>>>
>>>>> Lloyd
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Twisted-web mailing list
>>>> Twisted-web at twistedmatrix.com
>>>> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web
>>>
>>>
>>>
>>> _______________________________________________
>>> Twisted-web mailing list
>>> Twisted-web at twistedmatrix.com
>>> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web
>>
>>
>
>
>
> ------------------------------
>
> Message: 3
> Date: Thu, 07 Jul 2005 12:18:10 +0100
> From: Matt Goodall <matt at pollenation.net>
> Subject: Re: [Twisted-web] Introduction, newbie confusion plus an
> 	offer
> To: "Discussion of twisted.web, Nevow,	and Woven"
> 	<twisted-web at twistedmatrix.com>
> Message-ID: <42CD0F72.2040203 at pollenation.net>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Uwe (Peter) Feldtmann wrote:
>> Thank you. My confusion came from being on the twisted and nevow lists.
>>
>> Should we discuss nevow here or on divmod?
>
> Here in twisted-web.
>
> AFAIK, there is no Nevow discussion on divmod but it may be that I'm not
> subscribed to the right divmod list ;-).
>
> - Matt
>
>>
>> Matt Goodall wrote:
>>
>>> Uwe (Peter) Feldtmann wrote:
>>>
>>>> Can someone tell me where Nevow starts and where Twisted ends?  I
>>>> think Nevow needs Twisted but where is the development source held?
>>>> Is it at nevow.com divmod.org or in the Twisted source tree?
>>>
>>>
>>>
>>> Nevow code is at divmod.org. Twisted code is at twistedmatrix.com.
>>>
>>> Strictly speaking, Nevow doesn't need Twisted or rather, Nevow should
>>> be able to function without Twisted. However, there are twisted
>>> imports and a few Twisted-specific bits of code in Nevow.
>>>
>>> To be honest, I'm not sure if anyone is that interested in
>>> *completely* separating Nevow from Twisted. You can use Nevow outside
>>> of a Twisted event loop anyway.
>>>
>>> Note that some of the Nevow concepts are moving back into
>>> twisted.web2. At some point Nevow will start using t.web2 and,
>>> hopefully, we'll be able to remove (with backwards compatability)
>>> module from Nevow and rely on the t.web2 equivalents.
>>>
>>> Hope that helps.
>>>
>>> - Matt
>>>
>>>>
>>>> Thanks in advance.
>>>>
>>>> Ed Suominen wrote:
>>>>
>>>>> Lloyd, as a fairly experienced Nevow user who has gone through the
>>>>> same
>>>>> frustrations, I'll gladly help to the extent what you're writing
>>>>> about
>>>>> applies to Nevow. I understand that Twisted.web2 is more like Nevow
>>>>> than
>>>>> Twisted.web, so that may make sense. (Actually, you may want to use
>>>>> Nevow -- check it out at http://nevow.org/.)
>>>>> Contact me directly if interested. Also, don't forget the
>>>>> #twisted.web
>>>>> channel on the Freenode IRC server, which is an excellent real-time
>>>>> resource that has helped me a great deal with questions.
>>>>>
>>>>> Best regards,
>>>>> Ed Suominen
>>>>>
>>>>> On Wed, 2005-07-06 at 14:33 -0400, lloyd at paisite.com wrote:
>>>>>
>>>>>> Hello,
>>>>>>
>>>>>> I'm Lloyd, I'm baffled, and I'd like to offer my modest talents to
>>>>>> help
>>>>>> others like me come up to speed with Twisted.web in record time.
>>>>>>
>>>>>> I've been looking for a way to bring a large ColdFusion application
>>>>>> over
>>>>>> to Python. Twisted.web looks to offer all that I could wish for and
>>>>>> more.
>>>>>> The work to date is awe-inspiring. But... the documentation,
>>>>>> well-intentioned as it is, and much more ample than in many Open
>>>>>> Source
>>>>>> projects, truly baffles me.
>>>>>>
>>>>>> I'm first to admit my limitations: I'm still in the early learning
>>>>>> stages
>>>>>> of Python; I understand OO conceptually, but have little experience
>>>>>> writing or reading OO code; and, approaching the golden years,
>>>>>> undoubtably
>>>>>> have far fewer functioning neurons than most of the subscribers to
>>>>>> this
>>>>>> list, much less the brilliant young turks who have created the
>>>>>> Twisted
>>>>>> framework.
>>>>>>
>>>>>> But, browsing through the archives, it's clear that I am not alone
>>>>>> in my
>>>>>> confusion.
>>>>>>
>>>>>> So, I'd like to make a proposal:
>>>>>>
>>>>>> I have many years of writing and editing experience. Back in the
>>>>>> days when
>>>>>> personal computers were still connected to audio cassette
>>>>>> recorders, and I
>>>>>> was as excited but unenlightened about PCs as I am now about
>>>>>> Twisted, I
>>>>>> contributed three well-received articles to Personal Computing
>>>>>> magazine
>>>>>> under the name Techo Turkey. These helped readers hook up IBM
>>>>>> Selectric
>>>>>> Terminals to their new PCs, create a computer-controlled haunted
>>>>>> house for
>>>>>> Halloween, and set up a computer-controlled home security system.
>>>>>>
>>>>>> I would like now to offer to write some supplementary documentation
>>>>>> for
>>>>>> Twisted.web aimed at turkeys like me -- the really really basic
>>>>>> stuff plus
>>>>>> sure-to-work examples that can bring even Mickey-the-Dunce to
>>>>>> sufficient
>>>>>> level of understanding that he can participate creatively in the
>>>>>> Twisted
>>>>>> community.
>>>>>>
>>>>>> The catch: I need knowledgeable folks willing to answer my many many
>>>>>> stupid questions like, once you've installed Twisted from, say,
>>>>>> Debian,
>>>>>> where should what files go and how should permissions be defined?
>>>>>> Undoubtably these generous mentors would also need to critique my
>>>>>> newbie
>>>>>> code and perhaps, even, submit examples of their own. Who know,
>>>>>> maybe we
>>>>>> could even get a book out of it.
>>>>>>
>>>>>> Any takers?
>>>>>>
>>>>>> Best wishes,
>>>>>>
>>>>>> Lloyd
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Twisted-web mailing list
>>>>> Twisted-web at twistedmatrix.com
>>>>> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web
>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Twisted-web mailing list
>>>> Twisted-web at twistedmatrix.com
>>>> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web
>>>
>>>
>>>
>>
>> _______________________________________________
>> Twisted-web mailing list
>> Twisted-web at twistedmatrix.com
>> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web
>
> --
>       __
>      /  \__     Matt Goodall, Pollenation Internet Ltd
>      \__/  \    w: http://www.pollenation.net
>    __/  \__/    e: matt at pollenation.net
>   /  \__/  \    t: +44 (0)113 2252500
>   \__/  \__/
>   /  \          Any views expressed are my own and do not necessarily
>   \__/          reflect the views of my employer.
>
>
>
> ------------------------------
>
> Message: 4
> Date: Thu, 7 Jul 2005 04:23:56 -0700 (PDT)
> From: Md Moin <mdmoin939 at yahoo.com>
> Subject: [Twisted-web] XML RPC authentication
> To: twisted-web at twistedmatrix.com
> Message-ID: <20050707112356.21861.qmail at web40906.mail.yahoo.com>
> Content-Type: text/plain; charset=iso-8859-1
>
> I would like to setup a XML RPC server with
> authentication functionality based on username and
> password.Is there any simple example available for XML
> RPC server/client that uses username/password
> authentication?
> Thanx
>
>
>
> __________________________________
> Yahoo! Mail for Mobile
> Take Yahoo! Mail with you! Check email on your mobile phone.
> http://mobile.yahoo.com/learn/mail
>
>
>
> ------------------------------
>
> Message: 5
> Date: Thu, 07 Jul 2005 14:07:24 +0100
> From: Alberto Trujillo <alberto.trujillo at ucd.ie>
> Subject: [Twisted-web] how are solving the calls to the children in
> 	nevow?
> To: twisted-web at twistedmatrix.com
> Message-ID: <42CD290C.3000503 at ucd.ie>
> Content-Type: text/plain; format=flowed; charset=ISO-8859-1
>
> Hello:
> I have been following this example
> "http://nevowexamples.adytum.us/childrenhtml/"to know how works the
> calls to the children with nevow, but still it's not enough clear for me.
>
> I even add a new child in the childFactory and some print command to
> follow the way of the calls. Here I show you my modifications:
>
>     def childFactory(self, ctx, name):
>         print "NAME = " + name
>         if name in ['1', '2', '3']:
>             return ChildPage(name)
>         elif name == 'one':
>             return OneRoot()
>
>     def locateChild(self, ctx, segments):
>         child, remainingSegments = rend.Page.locateChild(self, ctx,
> segments)
>         print "CHILD = " + str(child) + " SEGMENT = " +
> str(remainingSegments)
>         if child:
>             print "IN THE IF"
>             return child, remainingSegments
>
>         return ChildPage('/'.join(segments)), []
>
> My question is why each time that I call to "one" it goes inside
> "locateChild" wheter "one" is place in "childFactory", here is a trace
> of my server.
>
> 2005/07/07 13:52 IST [HTTPChannel,0,127.0.0.1] NAME = one
> 2005/07/07 13:52 IST [HTTPChannel,0,127.0.0.1] CHILD = <one.OneRoot
> object at 0x40701eac> SEGMENT = ()
> 2005/07/07 13:52 IST [HTTPChannel,0,127.0.0.1] IN THE IF
> 2005/07/07 13:52 IST [HTTPChannel,0,127.0.0.1] 127.0.0.1 - -
> [07/Jul/2005:12:52:11 +0000] "GET /one?id=1 HTTP/1.1" 200 47
> "http://localhost:8080/" "Mozilla/5.0 (X11; U; Linux i686; en-US;
> rv:1.7.8) Gecko/20050517 Firefox/1.0.4 (Debian package 1.0.4-2)"
> 2005/07/07 13:52 IST [HTTPChannel,0,127.0.0.1] NAME = favicon.ico
> 2005/07/07 13:52 IST [HTTPChannel,0,127.0.0.1] CHILD = None SEGMENT = ()
> 2005/07/07 13:52 IST [HTTPChannel,0,127.0.0.1] 127.0.0.1 - -
> [07/Jul/2005:12:52:11 +0000] "GET /favicon.ico HTTP/1.1" 200 684 "-"
> "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050517
> Firefox/1.0.4 (Debian package 1.0.4-2)
>
> And when I return to the father, who call to childrenRoot class again,
> and what is favicon.ico?. I show you the results here.
>
> 2005/07/07 13:58 IST [HTTPChannel,1,127.0.0.1] NAME = favicon.ico
> 2005/07/07 13:58 IST [HTTPChannel,1,127.0.0.1] CHILD = None SEGMENT = ()
> 2005/07/07 13:58 IST [HTTPChannel,1,127.0.0.1] 127.0.0.1 - -
> [07/Jul/2005:12:58:34 +0000] "GET /favicon.ico HTTP/1.1" 200 684 "-"
> "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050517
> Firefox/1.0.4 (Debian package 1.0.4-2)"
>
> I would like to know as well if I must to implement all these methods
> each time that I'm working with children, and what is segments.
>
> Sorry I know that are a lot of question, but I don't have access to the
> IRC channel and I couldn't understand the information in
> "inevow.IReource".
>
> Thanks a lot
>
>
>
> ------------------------------
>
> Message: 6
> Date: Thu, 07 Jul 2005 14:31:50 +0000
> From: weeti <weeti at usr.fi>
> Subject: Re: [Twisted-web] Re: How work formless?
> To: "Discussion of twisted.web, Nevow,	and Woven"
> 	<twisted-web at twistedmatrix.com>
> Cc: twisted-web at twistedmatrix.com
> Message-ID: <1120746710l.1894l.1l at wx31>
> Content-Type: text/plain; charset=us-ascii; DelSp=Yes; Format=Flowed
>
>
> On 07/04/05 13:50:06, Alberto Trujillo wrote:
>> Hello Donovan:
>> Thank again for your help, here I send you the files. Everythings is
>> working like I told you before, but I don't see the error message in
>> the screen.
>>
>> year.html
>> ----------------
>> <form action="freeform_post!!selectYear" method="POST">
>>    Type a year: <input type="text" name="year" />
>>    <input type="submit" />
>> </form>
>>
>> year.py
>> ------------
>> from nevow import rend, loaders
>> import formless
>>
>> class YearChooseable(formless.TypedInterface):
>>    def selectYear(self, year=formless.Integer()):
>>        pass
>>    selectYear = formless.autocallable(selectYear)
>>
>>
>> class Colorful(rend.Page):
>>    __implements__ = YearChooseable, rend.Page.__implements__
>>    addSlash = True
>>
>>    def selectYear(self, year):
>>        self.test = True
>> #        return rend.Page.locateChild(self, context, segments)
>>          docFactory = loaders.xmlfile("year.html")
>>
>> year.tac
>> -------------
>> from twisted.application import internet, service
>> from nevow import appserver
>> import year
>>
>> application = service.Application("tasks")
>> webserver = internet.TCPServer(8080, appserver.NevowSite
>> (year.Colorful()))
>> webserver.setServiceParent(application)
>>
>> _______________________________________________
>> Twisted-web mailing list
>> Twisted-web at twistedmatrix.com
>> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web
>>
>>
>
> Hi
> Maybe you should have a place where to render those error-messages in
> your template? and in any case, you can access them in IFormErrors
> (ctx).
>
>
>
>
> ------------------------------
>
> _______________________________________________
> Twisted-web mailing list
> Twisted-web at twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web
>
>
> End of Twisted-web Digest, Vol 16, Issue 6
> ******************************************
>
>





More information about the Twisted-web mailing list