Custom Query (58 matches)


Show under each result:

Results (34 - 36 of 58)

2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Ticket Resolution Summary Owner Reporter
#1442 fixed Error in the translation of methods to javascript apoirier apoirier

Reported by apoirier, 9 years ago.


A function can be automatically translated to javascript:

def greet():
   window.alert('Hello world!')

class MyComponent(object):

def render(self, h, *args):
   return h.input(type='submit', onclick=greet)

But the translation of a method:

class MyComponent(object):
   def greet(self):
       window.alert('Hello world!')

def render(self, h, *args):
   return h.input(type='submit', onclick=self.greet)

raises an IndentationError exception:

File '/Volumes/data/projects/nagare/dev/src/nagare/core/nagare/namespaces/', line 68 in add_attribute
  xml.add_attribute(self, name, ajax.JS(value))
File '/Volumes/data/projects/nagare/dev/src/nagare/core/nagare/', line 339 in __init__
  self.javascript = str2js(src, module)
File '/Volumes/data/projects/nagare/dev/src/nagare/core/nagare/', line 300 in str2js
  pyjs.Translator(namespace, compiler.parse(src), output)
File '/opt/stackless-2.6.2/lib/python2.6/compiler/', line 51 in parse
  return Transformer().parsesuite(buf)
File '/opt/stackless-2.6.2/lib/python2.6/compiler/', line 128 in parsesuite
  return self.transform(parser.suite(text))
IndentationError: unexpected indent (line 1)
#1443 fixed Exception when the default renderer of a WSGIApp is asynchronous apoirier apoirier

Reported by apoirier, 9 years ago.


When the default renderer for a WSGIApp is an asynchronous renderer:

from nagare import wsgi
from nagare.namespaces import xhtml

class WSGIApp(wsgi.WSGIApp):
    renderer_factory = xhtml.AsyncRenderer

a TypeError exception is raised:

File '/Volumes/data/projects/nagare/dev/lib/python2.6/site-packages/WebError-0.10.1-py2.6.egg/weberror/', line 431 in respond
  app_iter = self.application(environ, detect_start_response)
File '/Volumes/data/projects/nagare/dev/src/nagare/core/nagare/', line 483 in __call__
  response = self.on_exception(request, response)
File '/Volumes/data/projects/nagare/dev/src/nagare/core/nagare/', line 465 in __call__
  output = top.wrap(renderer.content_type, renderer, output)
File '/Volumes/data/projects/nagare/dev/src/nagare/core/nagare/', line 55 in wrap
  body.insert(0, head1)
File 'lxml.etree.pyx', line 715 in lxml.etree._Element.insert (src/lxml/lxml.etree.c:32123)
TypeError: Argument 'element' has incorrect type (expected lxml.etree._Element, got str)
#1444 fixed nagare_replaceNode and nagare_updateNode bug when no HTML is rendered apoirier bertrand.croq

Reported by bertrand.croq, 8 years ago.


When a rendering method that only uses h.script is used to update a component, nagare_replaceNode and nagare_updateNode raise an error in the browser.

2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Note: See TracQuery for help on using queries.