django-dajax icon indicating copy to clipboard operation
django-dajax copied to clipboard

collectstatic breaks if django_dajax installed as a zipped egg

Open ngkabra opened this issue 12 years ago • 8 comments

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.

ngkabra avatar Jan 31 '13 08:01 ngkabra

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

ghost avatar Jan 31 '13 17:01 ghost

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.

ngkabra avatar Feb 01 '13 03:02 ngkabra

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

ghost avatar Feb 01 '13 05:02 ghost

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

ngkabra avatar Feb 02 '13 01:02 ngkabra

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.

ghost avatar Feb 02 '13 03:02 ghost

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

dekoza avatar Jun 05 '14 22:06 dekoza

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

luckydonald avatar Nov 05 '15 15:11 luckydonald

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

setup.py

setup(
    ...
    zip_safe = False,
)

luckydonald avatar Nov 05 '15 15:11 luckydonald