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
- [Answered ]-The django + nginx can't load staticfiles
- [Answered ]-The "select all" header checkbox that I used in Django 1.5 is missing in Django 1.9
- [Answered ]-Wrong GenericForeignKey name in _meta.get_all_field_names()
- [Answered ]-Single Quotes not showing up properly in HighCharts graph
- [Answered ]-Django Date formatting in forms query
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):
π€darren
- [Answered ]-Reverse for 'detail' with arguments '('',)' and keyword arguments '{}' not found
- [Answered ]-MultiForm Updateview Django
- [Answered ]-Django primary key in tests
Source:stackexchange.com