On Nov 28, 4:03 pm, Alberto Valverde <[EMAIL PROTECTED]> wrote:
> I've recently added a Pylons sample app integrating ToscaWidgets
> (http://toscawidgets.org, former TGWidgets, v2 of TurboGears' widgets).


I had to make the following patch to the code you linked to in order
for it to work:


=== pylonstwsample/lib/base.py
==================================================================
--- pylonstwsample/lib/base.py  (revision 7800)
+++ pylonstwsample/lib/base.py  (local)
@@ -2,7 +2,8 @@
 from pylons.controllers import WSGIController
 from pylons.decorators import jsonify, validate
 from pylons.templating import render, render_response
-from pylons.helpers import abort, redirect_to, etag_cache, _
+from pylons.helpers import abort, redirect_to, etag_cache
+from pylons.util import _
 import pylonstwsample.models as model
 import pylonstwsample.lib.helpers as h

=== pylonstwsample/lib/helpers.py
==================================================================
--- pylonstwsample/lib/helpers.py       (revision 7800)
+++ pylonstwsample/lib/helpers.py       (local)
@@ -4,4 +4,4 @@
 All names available in this module will be available under the Pylons
h object.
 """
 from webhelpers import *
-from pylons.helpers import _, log, set_lang, get_lang
+from pylons.util import _, log, set_lang, get_lang


--~--~---------~--~----~------------~-------~--~----~
 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