[pylons-discuss] Mako templates with Deform

2014-08-22 Thread pyramidX
I'm using Mako templates and have tried using Deform and it seems to work 
even though I haven't converted any widget templates to Mako from 
chameleon. Why is that? 
http://deform.readthedocs.org/en/latest/templates.html says Optionally, 
convert all the existing Deform templates to your templating language of 
choice. This is only necessary if you choose to use the widgets that ship 
as part of Deform. but I am using the widgets that ship with Deform, so 
I'm not sure why it's working.

If I want to add a single new widget template and want to write it in Mako, 
does that mean I need to change ALL the widget templates? For example if I 
have a form with 10 field and I want to rewrite 1 of them, and I don't want 
to write it in chameleon, can I only rewrite that 1 widget or do I have to 
rewrite all 10?

-- 
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pylons-discuss+unsubscr...@googlegroups.com.
To post to this group, send email to pylons-discuss@googlegroups.com.
Visit this group at http://groups.google.com/group/pylons-discuss.
For more options, visit https://groups.google.com/d/optout.


Re: [pylons-discuss] Mako templates with Deform

2014-08-22 Thread Wichert Akkerman

On 22 Aug 2014, at 10:39, pyramidX veerukrish...@hotmail.com wrote:

 I'm using Mako templates and have tried using Deform and it seems to work 
 even though I haven't converted any widget templates to Mako from chameleon. 
 Why is that?

I am guessing deform renders the widget templates itself, so the template 
language used for widgets is just an implementation detail that you never have 
to think about.

 http://deform.readthedocs.org/en/latest/templates.html says Optionally, 
 convert all the existing Deform templates to your templating language of 
 choice. This is only necessary if you choose to use the widgets that ship as 
 part of Deform. but I am using the widgets that ship with Deform, so I'm not 
 sure why it's working.

That documentation might be wrong.

 If I want to add a single new widget template and want to write it in Mako, 
 does that mean I need to change ALL the widget templates? For example if I 
 have a form with 10 field and I want to rewrite 1 of them, and I don't want 
 to write it in chameleon, can I only rewrite that 1 widget or do I have to 
 rewrite all 10?

I'ld say no; you can probably choose the template tool to use per widget as 
part of its implementation.

Wichert.

-- 
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pylons-discuss+unsubscr...@googlegroups.com.
To post to this group, send email to pylons-discuss@googlegroups.com.
Visit this group at http://groups.google.com/group/pylons-discuss.
For more options, visit https://groups.google.com/d/optout.


Re: [pylons-discuss] Re: Realtime server pushes

2014-08-22 Thread Mathieu Drapeau
Sontek, you are right... I did spent too much time already trying to make 
this work using SSE as I used to do with websockets!
It appears, I have no easy way to stop the stream from server side, the 
browser keeps hammering the server whatever I am trying. Plus debugging SSE 
is painfull, you cannot inspect response from the browser. Support for SSE 
in browsers is also horrible.

On the other hand, there isn't any much options left with pyramid 
integration (either with sockjs or socket.io)... Most of projects seemed to 
be abandoned...

Sontek, what is the latest stack you have been using for realtime pushes?


On Saturday, August 16, 2014 2:17:42 PM UTC-4, Sontek wrote:

 You want to be careful when using Server Side Events (SSE) they are not a 
 very good alternative to WebSockets or Comet if you are expecting to build 
 a service for an unknown user base.  SSE is not supported in even the 
 latest Internet Explorer browsers and if you can't guarantee your users 
 wont have IE then using something like sockjs or socket.io would be a 
 better alternative since they support multiple transports so that they will 
 work in all browsers.


 On Mon, Aug 4, 2014 at 11:47 AM, Mathieu Drapeau matt...@hotmail.com 
 javascript: wrote:

 Hey Blaise, thanks for your response!! :)
 Good point... SSE should be enough to handle most of my use cases.



 On Monday, August 4, 2014 2:15:38 PM UTC-4, Blaise Laflamme wrote:

 Hi Mathieu,

 if you're looking at server push only, and not bi-directional channel 
 communication, SSE could be a good and simple alternative?

 On Monday, August 4, 2014 11:07:45 AM UTC-4, Mathieu Drapeau wrote:

 It seems there is few current possibilities to do realtime server 
 pushes using different libs (gevent-socketio, pyramid_sockjs, 
 pyramid_socketio).
 Some of them are deprecated and it seems that gevent-socketio hasn't 
 been updated for several months and doesn't support socketio 1.0 yet.

 What are you suggesting to use for realtime pushes using pyramid?
 Found that autobahn uses websocket on top of asyncio (
 http://autobahn.ws/python/), wondering if it could be easily 
 integrated with pyramid?

 thanks

  -- 
 You received this message because you are subscribed to the Google Groups 
 pylons-discuss group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to pylons-discus...@googlegroups.com javascript:.
 To post to this group, send email to pylons-...@googlegroups.com 
 javascript:.
 Visit this group at http://groups.google.com/group/pylons-discuss.
 For more options, visit https://groups.google.com/d/optout.




-- 
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pylons-discuss+unsubscr...@googlegroups.com.
To post to this group, send email to pylons-discuss@googlegroups.com.
Visit this group at http://groups.google.com/group/pylons-discuss.
For more options, visit https://groups.google.com/d/optout.