dajax - No module named 'Dajaxice' -


import in html:

<script src="/media/js/jquery-2.0.2.js"></script> <script src="jquery.dajax.core.js"></script>  <script type="text/javascript"> function oneri() {     dajaxice.rezervationapp.oneri(dajax.process) } </script> 

i use:

 <div class="span6"> <a href="#advicemodal" class="btn" role="button" onclick="oneri()" data-toggle="modal">Öneri al</a></div> 

in ajax.py

from django.template.loader import render_to_string dajaxice.decorators import dajaxice_register django.shortcuts import render rezervationapp.models import roomtype, room, market, profile, reservation   @dajaxice_register def oneri(request, word):     dajax = dajax()     p = profile.objects.get(firstname__contains=word)     dajax.assign('#advice','innerhtml', p)     return dajax.json() 

fully error:

importerror @ / no module named 'dajaxice' request method: request url:    http://127.0.0.1:8000/ django version: 1.5.1 exception type: importerror exception value:     no module named 'dajaxice' exception location: c:\python33\lib\site-packages\dajaxice\core\__init__.py in <module>, line 3 

but, same error. configured other file dajax tutorial. have idea?

the problem in difference between py2 , py3. py3 allows only explicit relative imports. works when add dot.

from .dajaxice import dajaxice, dajaxice_autodiscover 

Comments