0

Either I'm not seeing the obvious or something fundamental must be wrong. I'm playing around with dajax and first everything seemed to be working right. That is the alert "Hello world" test went through. But for some reason I can't get the assign function working. I also tested the call in the shell, no problems there.

ajax.py

from dajax.core import Dajax
from dajaxice.decorators import dajaxice_register

@dajaxice_register
def sayhello(request, pk):
    dajax = Dajax()

    dajax.alert(pk) #works
    dajax.assign('#ajaxize', 'innerHTML', 'invalid') #doesn't work
    return dajax.json()

HTML

<div id="ajax"><span id="ajaxize"></span></div>

I do have included the {% load dajaxice_templatetags %} and everything else suggested on this blog.

Edit

I forgot to mention: my browser debugger says 'ReferenceError: Can't find variable: clear_quotes'

LarsVegas
  • 6,522
  • 10
  • 43
  • 67

1 Answers1

0

Well, I had the same problem and the only thing that I did was erase the line where "clear_quotes" was used. After that, the code worked.

You have to create a virtual enviroment to do that change.

Lvcios
  • 49
  • 1
  • 6