It seems to me dajaxice is great! But I've spent last two days trying to make the dajaxice example to work (Opera, Firefox). I have searched everywhere in the intertubes to no avail. It seems everyone has an idea/solution how to solve this problem but no one has come up with a straightforward answer/solution.
Hi!
It seems to me dajaxice is great! But I've spent last two days trying to make the dajaxice example to work (Opera, Firefox). I have searched everywhere in the intertubes to no avail. It seems everyone has an idea/solution how to solve this problem but no one has come up with a straightforward answer/solution.
Versions Dajaxice - 0.9.2 Dajax - 0.7 Django 1.7 Python 3.2
Settings.py INSTALLED_APPS = ( 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'dajax', 'dajaxice',
TEMPLATE_LOADERS = ( 'django.template.loaders.filesystem.Loader', 'django.template.loaders.app_directories.Loader', 'django.template.loaders.eggs.Loader', # Uncomment? See http://django-dajaxice.readthedocs.org/en/latest/installation.html#installing-dajaxice ) TEMPLATE_CONTEXT_PROCESSORS = ( 'django.contrib.auth.context_processors.auth', 'django.core.context_processors.debug', 'django.core.context_processors.i18n', 'django.core.context_processors.media', 'django.core.context_processors.static', 'django.core.context_processors.request', 'django.contrib.messages.context_processors.messages' )
urls.py
Javascript function calculate(){Dajaxice.test_3.multiply(Dajax.process,{'a':$('#a').val(),'b':$('#b').val()})}
Form: x =
Ajax.py @dajaxice_register def multiply(request, a, b): dajax = Dajax() result = int(a) * int(b) dajax.assign('#result','value',str(result)) return dajax.json()
ERROR Traceback: File "/usr/local/lib/python3.2/dist-packages/django/core/handlers/base.py" in get_response
Exception Type: TypeError at /dajaxice/test_3.multiply/ Exception Value: multiply() takes exactly 3 arguments (1 given)
Request information: Get: No GET data Post:: argv = '{"a":"5","b":"6"}'
Please help!
Thanks in advance!