Re: Ruby's Template Engine for Python

Discussion in 'Python' started by Steve Howell, Dec 8, 2007.

  1. Steve Howell

    Steve Howell Guest

    --- Samuel <> wrote:

    > Hi,
    >
    > Following the masses I was drawn to RoR's website
    > today and I saw the
    > following HTML template in one of the screencasts:
    >


    I know a lot of Rails goodies have been ported to
    Python, so you might want to google some variations on
    "form_remote_tag python."

    This is what I came up with:

    http://pylonshq.com/pastetags/form_remote_tag

    I haven't used it personally, but hope this gets you
    pointed in the right direction.




    ____________________________________________________________________________________
    Never miss a thing. Make Yahoo your home page.
    http://www.yahoo.com/r/hs
     
    Steve Howell, Dec 8, 2007
    #1
    1. Advertising

  2. Steve Howell

    Samuel Guest

    On Sat, 08 Dec 2007 13:06:15 -0800, Steve Howell wrote:

    > This is what I came up with:
    >
    > http://pylonshq.com/pastetags/form_remote_tag


    I see that Pylons uses a standard templating systems with all the JS
    renderers hooked into it as standard template function calls. That's
    great, now I just have to find the piece of code that provides those
    callbacks.

    Ah, here it is:
    > http://pylonshq.com/WebHelpers/module-webhelpers.html


    And there I go, easily adding the same functionality to any template
    system of my choice. That was easier than I expected.

    Thanks for your help ;-)!

    -Samuel
     
    Samuel, Dec 8, 2007
    #2
    1. Advertising

  3. Steve Howell

    Guest

    On Dec 8, 3:24 pm, Samuel <> wrote:
    > On Sat, 08 Dec 2007 13:06:15 -0800, Steve Howell wrote:
    > > This is what I came up with:

    >
    > >http://pylonshq.com/pastetags/form_remote_tag

    >
    > I see that Pylons uses a standard templating systems with all the JS
    > renderers hooked into it as standard template function calls. That's
    > great, now I just have to find the piece of code that provides those
    > callbacks.
    >
    > Ah, here it is:
    >
    > >http://pylonshq.com/WebHelpers/module-webhelpers.html

    >
    > And there I go, easily adding the same functionality to any template
    > system of my choice. That was easier than I expected.
    >
    > Thanks for your help ;-)!
    >
    > -Samuel


    I think TurboGears does something similar using the Kid template
    system. You might find those useful as well:

    http://www.kid-templating.org/language.html
    http://turbogears.org/

    Mike
     
    , Dec 10, 2007
    #3
  4. a écrit :
    > On Dec 8, 3:24 pm, Samuel <> wrote:
    >
    >>On Sat, 08 Dec 2007 13:06:15 -0800, Steve Howell wrote:
    >>
    >>>This is what I came up with:

    >>
    >>>http://pylonshq.com/pastetags/form_remote_tag

    >>
    >>I see that Pylons uses a standard templating systems with all the JS
    >>renderers hooked into it as standard template function calls. That's
    >>great, now I just have to find the piece of code that provides those
    >>callbacks.
    >>
    >>Ah, here it is:
    >>
    >>
    >>>http://pylonshq.com/WebHelpers/module-webhelpers.html

    >>
    >>And there I go, easily adding the same functionality to any template
    >>system of my choice. That was easier than I expected.
    >>
    >>Thanks for your help ;-)!
    >>

    > I think TurboGears does something similar using the Kid template
    > system.


    I don't think so. I mean, I don't know what your thinking about, but
    Pylons webhelpers module is not tight to a specific template engine.

    OTHO, it - well, at least the 'remote' part - relies on a specific js
    lib, which is definitiveky not the one I'd choose, and the code it
    produces is not something I'd put in production - I definitively don't
    want 'onclick' attributes in my html code (yuck), and I'm one of those
    crazy guys that insist on having code working without javascript first.

    Oh, yes : also and FWIW, Kid has been somewhat superseded by Genshi, and
    Turbogears 2.0 is based on Pylons.
     
    Bruno Desthuilliers, Dec 10, 2007
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?SmViQnVzaGVsbA==?=

    Is ASP Validator Regex Engine Same As VS2003 Find Regex Engine?

    =?Utf-8?B?SmViQnVzaGVsbA==?=, Oct 22, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    745
    =?Utf-8?B?SmViQnVzaGVsbA==?=
    Oct 22, 2005
  2. Replies:
    1
    Views:
    395
    Sybren Stuvel
    Apr 10, 2006
  3. Sasha
    Replies:
    3
    Views:
    626
    Sasha
    May 22, 2007
  4. Samuel
    Replies:
    0
    Views:
    305
    Samuel
    Dec 8, 2007
  5. Ruby Baby
    Replies:
    1
    Views:
    143
    Ruby Baby
    Jan 23, 2004
Loading...

Share This Page