Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #1246 (closed defect: fixed)

Opened 12 years ago

Last modified 12 years ago

unbound method url() must be called with Turbogears instance as first argument

Reported by: joshua Owned by: alberto
Priority: normal Milestone:
Component: ToscaWidgets Version: trunk
Severity: normal Keywords:
Cc:

Description

Every first time a my app's page containing a DataGrid instance is called, I get a:

TypeError?: unbound method url() must be called with Turbogears instance as first argument (got str instance instead)

With the below patch applied it seems to work just fine:

Index: toscawidgets/mods/tg.py
===================================================================
--- toscawidgets/mods/tg.py	(revision 2379)
+++ toscawidgets/mods/tg.py	(working copy)
@@ -32,7 +32,7 @@
             _has_registered = True
     finally:
         _first_call_lock.release()
-    return self.__class__.url(url)
+    return self.url(url)
 
 
 class Turbogears(HostFramework):

Change History

comment:1 Changed 12 years ago by alberto

Fixed in [2385] by making url a staticmethod (really needs to call the method bound to the class itself)

Thanks :)

comment:2 Changed 12 years ago by alberto

  • Status changed from new to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.