On Tue, Sep 9, 2008 at 5:43 PM, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
>
> Hello,
> I am new to Pylon. I am using a RedHat linux box. Using easy_install,
> I have been able to install Pylon (including WebHelpers-0.6.1). Here
> is my problem:
>
> I have written a very basic/simple .mako template which contains the
> following line:
>  ${h.javascript_include_tag(builtins=True)}
>
> When invoking this template, I get a bunch of errors msgs, starting
> with the line:
> AttributeError: 'module' object has no attribute
> 'javascript_include_tag'
>
> So, using the interactive debugging mode, when i did
>>>> dir(webhelpers)
>
> I got the following:
> ['__builtins__', '__doc__', '__file__', '__name__', '__path__',
> 'html', 'mimehelper', 'util']
>
> This explains why I get the above error msg, since
> javascript_include_tag is defined in the 'rails' module in WebHelpers
> and somehow rails is MISSING from it.
>
> I even did another easy_install webhelpers, but there was no update
> made to my environment.
>
> So, can somebody tell me how to get this problem fixed (have 'rails'
> module installed as part of WebHelpers)?
>
> Thanks in advance for your help.
> Danesh

The rails helpers have been deprecated in 0.6 along with the
Javascript libraries (Prototype and Scriptaculous).  Also, the Pylons
imports have changed in 0.9.7.

If you're using Pylons 0.9.6, add this to myapp/lib/helpers.py:
    from webhelpers.rails import *

If you're using Pylons 0.9.7, add this to myapp/lib/helpers.py:
    from webhelpers.rails.wrapped import *

You should also check out the ton of new helpers outside the rails
package, which largely replace the rails helpers.  You'll have to
choose which ones you want and import them in helpers.py, or in
whichever module uses them.

The versions of Prototype and Scriptaculous in webhelpers.rails is not
necessarily up to date.  You can find a link to the upstream versions,
as well as suggested imports for helpers.py, in
What's New in Pylons 0.9.7?
http://wiki.pylonshq.com/pages/viewpage.action?pageId=11174779

-- 
Mike Orr <[EMAIL PROTECTED]>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to