views:

136

answers:

3

Hi, I was following the directions at http://wiki.github.com/jorgebastida/django-dajaxice/installation to install Dajaxice for simple AJAX support and I ran into an error I can't quite figure out. The lines:

from dajaxice.core import dajaxice_autodiscover
#dajaxice_autodiscover()

in urls.py seem to be causing an error (cannot import name dajaxice_autodiscover). When I look at the module files for Dajaxice I don't see one for autodiscover either. If I leave out these lines, will I have any troubles using dajaxice? Thanks.

+1  A: 

The import should be correct like that! dajaxice_autodiscover imported in __init.py__ of the core package, so it is supposed to work like that! More likely the whole app is probably installed in a wrong path, you could try to open a shell (python manage.py shell) and try import dajaxice and see what happens!

lazerscience
I am having the same problem, regardles of being able to import dajaxice in the shell. I think this whole dajax framework is terribly documented.
PythonUser
A: 

It looks like the wiki installation instructions are ahead of the available downloads. If you pull the latest version of the code from git and install that then the instructions work. I'm not sure how to install versions 1.4 and below though.

Rob LaRubbio
A: 

William What version of dajaxice do you have? the "registration approach" documented in github wiki work with dajaxice>=0.1.5

For older versions of dajaxice you should register your functions in settings.DAJAXICE_FUNCTIONS.

Anyway newest versions of dajaxice has less bugs.

Benito Jorge Bastida