[Answered ]-Dajaxice register functions

1πŸ‘

I had the same problem once. My solution isn’t that nice, but it worked for me. As you can read in the dajaxice docs you can serve the file statically when your done {% dajaxice_js_import "js/dajaxice.core.js"%}. That’s what I did, and I hardcoded the register of my function.
After a server restart I changed it to {% dajaxice_js_import %} and removed the hardcoded stuff, but the function was still registered.

πŸ‘€horndash

1πŸ‘

When registering function using DAJAXICE_FUNCTIONS option in settings.py you should call it as

Dajaxice.app.func(callback)

When using decorator @dajaxice_register call it as

Dajaxice.prj.app.func(callback)
πŸ‘€Winand

0πŸ‘

There are 2 ways to register a function with dajax. Have you tried both?
There is this way:

dajaxice_functions.register(myexample)

and this way:

@dajaxice_register
def myexample(request):

Creating my first dajaxice function

πŸ‘€darren

Leave a comment