Opened 11 years ago
Closed 11 years ago
#22774 closed Uncategorized (wontfix)
collectstatic does not work with zipped (egg) packages
Reported by: | minder | Owned by: | nobody |
---|---|---|---|
Component: | contrib.staticfiles | Version: | 1.6 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
I installed django-select2 which worked perfectly in my test venvironment. But during deployment, when I ran ./manage.py collectstatic, required files were not copied. It turned out that the package was installed as egg.
I couldn't find a topic about this problem except this ticket on django-dajax. This issue is present in currently stable Django (1.6.5).
The only solution by now is to reinstall the package manually enforcing unzipped installation.
Change History (2)
comment:1 by , 11 years ago
Component: | Core (Management commands) → contrib.staticfiles |
---|
comment:2 by , 11 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Jannis says he had implemented such a finder with pkg_resources
but he chose not to include it in Django. He thinks this is a duplicate of another ticket (but I haven't searched).
These days, Django doesn't attempt to support apps installed as eggs.
There's a template loader that you can enable to load templates from egg files. It was added long ago and I don't think we'd add it today if it weren't already there.
It's certainly possible to write a static files storage class that loads static files from eggs. You can do it outside of Django.
I'm going to ask the author of the staticfiles contrib app, who also knows a lot about packaging, if he believes this belongs to Django.
(Note that Django will still fail to load translations from apps installed as eggs, and that one is much more difficult to fix.)