[Twisted-web] Athena LivePage as a main page

Piotr Jackowski jackowski.piotr at gmail.com
Fri Feb 6 02:30:50 EST 2009


Hi

Thanks Dominik, your solution works without problems.
It was so obvious :)

Peter


On Thu, Feb 5, 2009 at 2:19 PM, Dominik Neumann <
dominik.neumann at metacreatic.de> wrote:

> Hi,
>
> in my app, the Index-Page is a LivePage (not
> rend.Page like your example),
> works for me without problems:
>
> class Index(AthenaLivePageClass):
>     def child_(self, ctx):
>       return AthenaLivePageClass()
>
> i think the LivePageClass needs child_ to work as root-page
> not the rend-Page.
>
> Regards,
> Dominik
>
>
>
> Piotr Jackowski schrieb:
>
>>
>>
>> Hi,
>>
>> I'm new to Nevow and Athena.
>> I have rather basic question. How to make athena livepage with
>> livefragment available from top path '/'.
>> LivePage has to be created every request, so
>> site =3D appserver.NevowSite(AthenaLivePageClass())
>> gives error after first refresh.
>>
>> Every example shows rend.Page() as a top pages and then for /foo  creates
>> Livepage:
>> def render_foo(self,ctx):
>>      f =3D AthenaLivePageClass()
>>      f.setFragmentParent(self)
>>      return ctx.tag[f]
>>
>>
>>
>> I came up with something like this:
>> class Index(rend.Page):
>>  ....
>>      def child_(self, ctx):
>>              return AthenaLivePageClass()
>>
>>
>>
>> I can now refresh, as many times as I want, and every time there is a new
>> object, but Javascript part doesn't work.
>> I have bunch 404 errors for javascript code requests e.g.:
>> http://localhost:8080/799467635f981be6a582cff5f88feb4e/jsmodule/Nevow
>>
>> Besides that issue, is there any documentation for Javascript classes
>>  Nevow, Divmod and etc ?
>>
>> Regards,
>> Peter
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-web/attachments/20090205/4e=
f06993/attachment.htm


More information about the Twisted-web mailing list