jorgebastida / django-dajaxice

Easy to use AJAX library for django. dajaxice mains goal is to trivialize the asynchronous communication within the django server side code and your js code. It's an "agnostic JS framework" approach and focus on decoupling the presentation logic.
http://dajaxproject.com/
Other
402 stars 174 forks source link

Unable to find dajaxice/dajaxice.core.js under Windows. #145

Open bear0330 opened 9 years ago

bear0330 commented 9 years ago

Django-dajaxice depends on staticfiles_storage to find the file path of dajaxice/dajaxice.core.js, it will call DajaxiceFinder -> DajaxiceStorage.exists with name: dajaxice/dajaxice.core.js. The implementation of DajaxiceStorage.exists is:

def exists(self, name):
    return name in self.files

but the DajaxiceStorage.files is defined as files = {os.path.join('dajaxice', 'dajaxice.core.js'): 'dajaxice_core_js'}, under the Windows, this would be 'dajaxice\\dajaxice.core.js' not 'dajaxice/dajaxice.core.js', so the exists always returning False.

DajaxiceStorage.files should be simply defined as files = {'dajaxice/dajaxice.core.js': 'dajaxice_core_js'}, then it works under Windows.