I've been at an issue after attempting to implement Dajax into my Django project.
At a certain point during the installation and usage instructions of the Dajax website, I was instructed to call a method in ajax.py as such:
<button type="button" onclick="Dajaxice.MyProject.MyApp.say_hello(Dajax_process)">Dajax</button>
But when I try to click said button, there is no response at all. It acts like a null button.
I'm still trying to figure out how Dajax would even recognize my say_hello function like this... but that's probably how Dajax is used.
I have my say_hello method implemented as follows:
from dajaxice.decorators import dajaxice_register
from dajax.core import Dajax
@dajaxice_register
def say_hello(req):
print "DAJAX"
dajax = Dajax()
dajax.alert("Hello World!")
return dajax.json()
At first glance, I believed that it was problem with not finding the method at all. I'm still not 100 % sure if that is the reason. But it could be.
Does anyone have any suggestions as to what I should look for?
I have all the instructions on the page: http://django-dajax.readthedocs.org/en/latest/installation.html#installing-dajax
Thanks, David