jorgebastida / django-dajax

Easy to use library to create asynchronous presentation logic with django and dajaxice
http://dajaxproject.com/
BSD 3-Clause "New" or "Revised" License
346 stars 99 forks source link

collectstatic breaks if django_dajax installed as a zipped egg #53

Open ngkabra opened 11 years ago

ngkabra commented 11 years ago

In my setup, I found that if django_dajax was installed as a zipped egg (e.g. easy_install -z django_dajax), then collectstatic failed to find dajax/jquery.dajax.core.js and other dajax static files. The problem went away when I forced easy_install to do an unzipped install (easy_install -Z django_dajax).

I have not really determined whether this is a problem with DajaxiceFinder, or Django staticfiles in general, or whether it was with django-pipeline (which I am also using) - so I cannot give a suggested fix for sure.

However, putting up the issue here, along with the suggested workaround (easy_install -Z) for the benefit of anyone else who runs into this problem.

ghost commented 11 years ago

I don't use django-pipeline, but I have installed django_dajax via PIP with no problem.

ngkabra commented 11 years ago

Like I said this is only a problem when it gets installed as a zipped up egg.

When installing with easy_install, whether it will get installed as a zipped up egg, or an unzipped directory depends upon the site wide configuration settings. So it will not affect everyone.

But, for example, on webfaction (which is one of the popular python hosting providers), it gets installed by default as a zipped up egg and runs into this problem. Over the weekend I will try to investigate some more and find out what is the exact cause of the problem.

ghost commented 11 years ago

Ok. I recommend you Heroku, where you can install the packages via pip.

ngkabra commented 11 years ago

That's not the point. The point is that dajax should work cleanly irrespectively of which platform/package installer the users are using.

ghost commented 11 years ago

Yes, you are right. I have recommended you other service for help you. Because I have thought that it was urgent for you fix that.

dekoza commented 10 years ago

I can confirm this issue with other packages zipped as eggs in Django 1.6.5. Looks like an issue with Django itself.

luckydonald commented 9 years ago

It is somehow filed as issue in django: https://code.djangoproject.com/ticket/22774

luckydonald commented 9 years ago

http://stackoverflow.com/a/29124937/3423324 brings a solution:

setup.py

setup(
    ...
    zip_safe = False,
)