the link you posted has an example
----
# Import jQuery. Note: JavaScript variables have to be# imported from the fake
__javascript__ module.from __javascript__ import jQuery
# Create a simple widget classclass ClickWidget(object):
def __init__(self, base_elem):
# Add some initial HTML code
base = jQuery(base_elem)
base.html('<div class="clickme">Click me!</div>'
'<div class="change">Then this will change.</div>')
self.output_div = jQuery('.change', base)
# Bind the click event to the on_click method
jQuery('.clickme', base).bind('click', self.on_click)
# This is our click event handler
def on_click(self, event):
self.output_div.append(' It clicked!')
# Install our widget
widget = ClickWidget('body')
----
which results in: ReferenceError: jquery is not defined
i put jquery.js into the "public" folder so its avalable in the output
folder
i also tried lowercase jquery instead jQuery
still the same error.
On Friday, August 24, 2012 4:14:10 PM UTC+2, apexi.200sx wrote:
>
> It would be good if someone who knows the internals could create a basic
> workflow and/or diagram as to how the whole thing hangs together in the
> browser. Also a high level (or detailed time permitting) of how the
> translation process works. This may then allow more mere mortals to help.
>
> Also I am just wondering why so much effort is being made in creating pyjd
> runtime at this moment in time when there are other needs in the area where
> pyjs is more unique... Python in the browser. While nice to have a pyjd
> runtime there are other options for python desktop GUI building.
>
> By the way I am not criticising. A stable pyjd runtime is welcome !
>
> Recently there has been alot of discussion and confusion ? As to how
> interaction with JS should be done. Has anyone got any comments as to
> whether the following is relevant of advisable ?
>
>
> http://www.allbuttonspressed.com/blog/django/2010/11/Offline-HTML5-canvas-app-in-Python-with-django-mediagenerator-Part-1-pyjs
>
> BH
>
> On 24 Aug 2012, at 15:03, Tobias Baum <[email protected] <javascript:>>
> wrote:
>
> Hi everybody,
>
> I'm not sure if this is right place and time to address this, since pyjs
> is gone through some changes in the last time, but I would like to add
> "documentation and communication" to the agenda.
>
> I'm following the pyjs/pyjamas project for a while to figure out if this
> project can be the GUI framework I and (I think a) lot of Python users are
> looking for. But at the moment pyjs is confusing.
>
> For example usage is unclear and examples are not working properly.
>
> Usage
> ---------
>
> The websites says:
> "pyjs contains a Python-to-JavaScript compiler, an AJAX framework and a
> Widget Set API."
> but is it possible to use the compiler without the rest, without the
> DOM-wrapper. How can this be achieved?
>
> I think a couple of "hello world" examples addressing each use case would
> be really helpful for starters to
> understand the separate components.
>
> Also some examples are broken:
> -------------------------------------------------
> canvas processing:
> CanvasProcessing undefined: called Processing constructor as if it were a
> function: missing 'new'.
> dynatable.py: Failed to access data: {'code': 405, 'message': ' ', 'data':
> None}
> mail: Mail TypeError: __init__() takes exactly 1 argument (3 given)
>
> Even the "hello world" examples on the pyjs.org site do not work for me:
> helloworld: blank site
> helloworld w/bootsplash: blank site
> both link to the same location
>
> etc...
>
> To make it short.
> ------------------------
> Even though pyjs is gone through some chances in the last months it would
> be good to inform the users about the status. I would like to help maybe
> doing organization, documentation or testing, but right now I'm not sure if
> you can need help from "end users", since there is so much code broken and
> most important I'm also not sure about what the goals are that you want to
> address with pyjs\pyjd\pyjamas etc. Will there ever be a final or stable
> version with an restricted set of features and is this even possible with
> your approach?
>
> Thanks in advance
>
> --
>
>
>
>
>
--