Comments (10)
If you know your object name you can use something like "myObject.callback_function" as callback. Dajaxice will execute .... myObject.callback_function(data).
It should work.
Cheers
from django-dajaxice.
if I could pass a function reference rather than a string for the function, things would work much easier.
basically replace the 'eval' with execution of the passed func reference.
from django-dajaxice.
accidentally closed this
from django-dajaxice.
Can you share a workaround to solve this issue ?
from django-dajaxice.
let me dig thru the the js code generator, and try a few things
from django-dajaxice.
added a check in DajaxiceRequest.py for callback existance (used 'None' if nothing passed)
modified dajaxice.core.js to eval responsetext then directly execute passed callback js func.
I'll add an ExtJS generated callback func test tonight......all in all I'm not seeing any problems
from django-dajaxice.
I have a working solution. Whats the best way for me to submit my changes?
from django-dajaxice.
If you want, branch dajaxice in github and push the changes, then I can pull the diff.
from django-dajaxice.
It would indeed be very nice if the callback could be specified as this.my_method(), directly referring to the current object's local scope. I'll be pulling from amccool's repo for now, in hope to see this change merged and documented soon :)
Thanks the fix!
from django-dajaxice.
In the last HEAD version callbacks can be functions and not strings. Old string based callbacks are still supported but will be deprecated soon.
from django-dajaxice.
Related Issues (20)
- No error reporting when DEBUG=False
- Dajaxice generated url does not take WSGIScriptAlias into account HOT 1
- Forked and maintained django-dajaxice HOT 1
- DeprecationWarning HOT 1
- Running a django project in a folder
- Pull request #75 /issue #69 back in version 0.6
- Dajaxice only registers one function
- Is there a way to split ajax.py into a few smaller files? HOT 2
- error after django 1.7 upgrade: __init__() got an unexpected keyword argument 'mimetype' HOT 1
- XMLHttpRequest emits onreadystatechange but not onload event HOT 1
- content-type application/octet-stream Problem if nosniff active on webserver
- Incompatibility with django-debug-toolbar
- Unable to find dajaxice/dajaxice.core.js under Windows.
- RemovedInDjango19Warning
- Django server in one computer, client in other computer Problem
- "No module named 'Dajaxice'" with python 3
- dajaxice.core.js:606 Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience.
- Modify GitHub blurb
- safe_dict(d) has same error as old dajaxice project
- Error in new version of Django in urlpatterns
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-dajaxice.