Sunday, June 30, 2013

dajaxice file cannot be found

I am usering django_dajax 0.9.2 and django_dajaxice 0.5.5 for my current project. This is how I configure it

MAIN_DIR = os.path.dirname(__file__)
PROJECT_DIR = MAIN_DIR.rsplit(os.sep, 1)[0]

# Example: "/home/media/"
STATIC_ROOT = os.path.join(PROJECT_DIR, 'static')

# URL prefix for static files.
# Example: ""
STATIC_URL = '/static/'

# Additional locations of static files
    # Put strings here, like "/home/html/static" or "C:/www/django/static".
    # Always use forward slashes, even on Windows.
    # Don't forget to use absolute paths, not relative paths.
    os.path.join(MAIN_DIR, 'static'),

# List of finder classes that know how to find static files in
# various locations.

and my

from dajaxice.core import dajaxice_autodiscover, dajaxice_config

if settings.DEBUG:
    urlpatterns = patterns('',
        (r'^media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}),

urlpatterns += patterns('',
    url(dajaxice_config.dajaxice_url, include('dajaxice.urls')),

With this settings, I am enable to use these libs in my local machine. However, when deploying to the client machine, the file dajaxice.core.js cannot be found (see it on firebug). When use python collecstatic, I see that that file is saved into the folder temp (Copying '/tmp/tmpsiiuMx'). The rendered link is correct

<script src="/static/dajaxice/dajaxice.core.js" type="text/javascript" charset="utf-8"></script>
and there is indeed that file under the /static/dajaxice folder, but still the browser complains about cannot find that file. Do you have any idea about this ?

You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
For more options, visit

No comments:

Post a Comment