"Max Ischenko" <[EMAIL PROTECTED]> writes:

> The 'new' syntax is fully compatible with the old one so you don't have
> to make any changes unless you're willing to use DataGrid.Column.

Are there any advantages on that?  If not, then I prefer using the simplest
approach. 

>>   File 
>> "/home/godoy/desenvolvimento/python/TurboGears/trunk/turbogears/widgets/templates/datagrid.py",
>>  line 31, in _pull
>> NameError: name 'name' is not defined
>
> Looks like 'name' is not injected in the template's namespace. Are you sure
> you're using new widgets codebase? Does the tests in widgets/tests/ runs

There's no call to "oldwidgets" on my code... 

> without errors on your machine?

Yes, they do. 

================================================================================
[EMAIL PROTECTED] ~/desenvolvimento/python/TurboGears/trunk/turbogears/widgets 
% nosetests       
................................
----------------------------------------------------------------------
Ran 32 tests in 1.020s

OK
[EMAIL PROTECTED] ~/desenvolvimento/python/TurboGears/trunk/turbogears/widgets 
% 
================================================================================


But not all tests are OK:

================================================================================
[EMAIL PROTECTED] ~/desenvolvimento/python/TurboGears/trunk % nosetests 
.................../home/godoy/desenvolvimento/python/TurboGears/trunk/turbogears/errorhandling.py:81:
 DeprecationWarning: Use decorator error_handler on per-method base rather than 
defining a validation_error method.
  DeprecationWarning, 1)
...............................E..E/home/godoy/desenvolvimento/python/TurboGears/trunk/turbogears/tests/form.kid:39:
 DeprecationWarning: widget.insert should be replaced with widget.display
/home/godoy/desenvolvimento/python/TurboGears/trunk/turbogears/tests/form.kid:50:
 DeprecationWarning: widget.insert should be replaced with widget.display
/home/godoy/desenvolvimento/python/TurboGears/trunk/turbogears/tests/form.kid:63:
 DeprecationWarning: widget.insert should be replaced with widget.display
..........................................................
======================================================================
ERROR: test module turbogears.tests.test_i18n in 
/home/godoy/desenvolvimento/python/TurboGears/trunk
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/nose-0.8.4-py2.4.egg/nose/core.py", 
line 409, in run
    self.setUp()
  File "/usr/lib/python2.4/site-packages/nose-0.8.4-py2.4.egg/nose/core.py", 
line 588, in setUp
    self.module = self.loader._import(self.module_name, self.path)
  File "/usr/lib/python2.4/site-packages/nose-0.8.4-py2.4.egg/nose/core.py", 
line 263, in _import
    module = nose.importer._import(name, [path])
  File 
"/usr/lib/python2.4/site-packages/nose-0.8.4-py2.4.egg/nose/importer.py", line 
64, in _import
    mod = load_module(fqname, fh, filename, desc)
  File 
"/home/godoy/desenvolvimento/python/TurboGears/trunk/turbogears/tests/test_i18n.py",
 line 31, in ?
    sogettext.create_so_catalog(["en","fi"], "messages")
  File 
"/home/godoy/desenvolvimento/python/TurboGears/trunk/turbogears/i18n/sogettext/__init__.py",
 line 58, in create_so_catalog
    TG_Message.dropTable(ifExists=True)
  File 
"/home/godoy/desenvolvimento/python/TurboGears/trunk/thirdparty/sqlobject/sqlobject/main.py",
 line 1308, in dropTable
    conn = connection or cls._connection
  File 
"/home/godoy/desenvolvimento/python/TurboGears/trunk/thirdparty/sqlobject/sqlobject/dbconnection.py",
 line 880, in __get__
    return self.getConnection()
  File 
"/home/godoy/desenvolvimento/python/TurboGears/trunk/turbogears/database.py", 
line 46, in getConnection
    raise AttributeError(
AttributeError: No connection has been defined for this thread or process


======================================================================
ERROR: 
turbogears.tests.test_form_controllers.test_invalid_form_with_error_handling
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/nose-0.8.4-py2.4.egg/nose/core.py", 
line 113, in runTest
    self.testFunc()
  File 
"/home/godoy/desenvolvimento/python/TurboGears/trunk/turbogears/tests/test_form_controllers.py",
 line 68, in test_invalid_form_with_error_handling
    assert root.has_errors
AttributeError: 'MyRoot' object has no attribute 'has_errors'
-------------------- >> begin captured stdout << ---------------------
09/Feb/2006:17:03:30 HTTP INFO Page handler: <bound method MyRoot.testform of 
<turbogears.tests.test_form_controllers.MyRoot object at 0x40a4e32c>>
Traceback (most recent call last):
  File 
"/usr/lib/python2.4/site-packages/CherryPy-2.2.0beta-py2.4.egg/cherrypy/_cphttptools.py",
 line 99, in _run
    self.main()
  File 
"/usr/lib/python2.4/site-packages/CherryPy-2.2.0beta-py2.4.egg/cherrypy/_cphttptools.py",
 line 247, in main
    body = page_handler(*virtual_path, **self.params)
  File "<string>", line 3, in testform
  File 
"/home/godoy/desenvolvimento/python/TurboGears/trunk/turbogears/controllers.py",
 line 189, in expose
    func, tg_format, html, fragment, *args, **kw)
  File 
"/home/godoy/desenvolvimento/python/TurboGears/trunk/turbogears/database.py", 
line 193, in run_with_transaction
    retval = func(*args, **kw)
  File 
"/home/godoy/desenvolvimento/python/TurboGears/trunk/turbogears/controllers.py",
 line 201, in _execute_func
    output = errorhandling.try_call(func, self, *args, **kw)
  File 
"/home/godoy/desenvolvimento/python/TurboGears/trunk/turbogears/errorhandling.py",
 line 69, in try_call
    output = dispatch_error(func, self, error, *args, **kw)
  File "<string>", line 5, in dispatch_error
  File 
"/home/godoy/desenvolvimento/python/TurboGears/trunk/turbogears/errorhandling.py",
 line 28, in _implicit_error_handler
    return getattr(self, error_source.__name__ )(*args, **kw)
  File "<string>", line 3, in testform
  File 
"/home/godoy/desenvolvimento/python/TurboGears/trunk/turbogears/controllers.py",
 line 184, in expose
    output = _execute_func(self, func, tg_format, html, fragment,
  File 
"/home/godoy/desenvolvimento/python/TurboGears/trunk/turbogears/controllers.py",
 line 201, in _execute_func
    output = errorhandling.try_call(func, self, *args, **kw)
  File 
"/home/godoy/desenvolvimento/python/TurboGears/trunk/turbogears/errorhandling.py",
 line 58, in try_call
    output = func(self, *args, **kw)
  File "<string>", line 3, in testform
  File 
"/home/godoy/desenvolvimento/python/TurboGears/trunk/turbogears/controllers.py",
 line 127, in validate
    return errorhandling.run_with_errors(errors, func, self, *args, **kw)
  File 
"/home/godoy/desenvolvimento/python/TurboGears/trunk/turbogears/errorhandling.py",
 line 88, in run_with_errors
    output = dispatch_error(func, self, errors, *args, **kw)
  File "<string>", line 5, in dispatch_error
  File 
"/home/godoy/desenvolvimento/python/TurboGears/trunk/turbogears/errorhandling.py",
 line 28, in _implicit_error_handler
    return getattr(self, error_source.__name__ )(*args, **kw)
TypeError: testform() takes at least 4 non-keyword arguments (3 given)

Request Headers:
  Host: localhost
localhost - - [09/Feb/2006:17:03:30] "GET 
/testform?name=ed&age=edalso&date=11/05/2005 HTTP/1.1" 500 3459

--------------------- >> end captured stdout << ----------------------


----------------------------------------------------------------------
Ran 111 tests in 20.685s

FAILED (errors=2)
================================================================================

And I'm using

================================================================================
[EMAIL PROTECTED] ~/desenvolvimento/python/TurboGears/trunk % LANG= svn info .
Path: .
URL: http://www.turbogears.org/svn/turbogears/trunk
Repository UUID: 77541ad4-5f01-0410-9ede-a1b63cd9a898
Revision: 715
Node Kind: directory
Schedule: normal
Last Changed Author: alberto
Last Changed Rev: 715
Last Changed Date: 2006-02-09 13:35:06 -0200 (Thu, 09 Feb 2006)
Properties Last Updated: 2006-02-08 23:58:51 -0200 (Wed, 08 Feb 2006)
================================================================================


-- 
Jorge Godoy      <[EMAIL PROTECTED]>

Reply via email to