Django-autocomplete-light: 'vendor' folder is missing

Created on 7 Mar 2016  Â·  16Comments  Â·  Source: yourlabs/django-autocomplete-light

In 3.0.1 I get 404-File-not-Found for the JS files located in the 'vendor' directory.

Yes, I have run "collectstatic" :-)

Most helpful comment

There is still one file missing in dal_legacy_static package. Can you please add the missing file and release a new package?

Missing file:admin/css/autocomplete.css

Source of required file: https://github.com/yourlabs/django-autocomplete-light/blob/master/src/dal_select2/widgets.py#L85

required file itself from Django: https://github.com/django/django/blob/master/django/contrib/admin/static/admin/css/autocomplete.css

All 16 comments

+1, installed 3.1.0 with pip and getting 404 for the following:

  • http://localhost:8000/static/autocomplete_light/vendor/select2/dist/css/select2.css
  • http://localhost:8000/static/autocomplete_light/vendor/select2/dist/js/select2.full.js

The /static/autocomplete_light dir after collectstatic (no vendor dir created):

  • autocomplete.init.js
  • jquery.init.js
  • select2.css
  • select2.js

Tried git submodule update --init ?

@jpic comparing with 3.0.4 release on PyPI it looks like 3.1.0 is missing the vendor dir in src/dal_select2/static/autocomplete_light/

Thanks !!​

Fixed in 3.1.1

I guess we need to find a curative solution against that, perhaps
automating releases ^^

Sorry for the delay.

Best

@jpic thanks! I can confirm 3.1.1 release solves this issue.

Yes, fixed in 3.1.1
Thank you very much!

Seems to have reappeared in 3.3.2

Steps to recreate:

  1. Download the 3.3.2 gz file from PyPi
  2. Search for directories called "vendor"

There's only one and it's in dal_jal. However dal_select2/widgets.py line 57 references 'admin/css/vendor/select2/select2%s.css' % extra

admin/css/vendor is supposed to be provided by django 2
however we could host a local copy for django < 2.0, if you think that could fix the issue ?

Yes. Just to need to think of a tidy way to handle forward and backwards compat.

How about keeping the "missing" files in a separate dal app: "dal_legacystatic" or similar?

The docs could then clearly state: "If you're using Django < 2.0 then add dal_legacystatic to installed apps."

Sounds good ! Do you want to propose the patch ?

Congrats @andybak for fixing the issue in master with #1085 :champagne:

Please @all someone could confirm the fix works for the with master ?

Or do you prefer a release right away ?

@jpic
We tested the fix and it seems to be working. When will you release a new version?

Released in 3.3.4

Please re-open in case of regression

Thanks for your input and have a great day :+1:

There is still one file missing in dal_legacy_static package. Can you please add the missing file and release a new package?

Missing file:admin/css/autocomplete.css

Source of required file: https://github.com/yourlabs/django-autocomplete-light/blob/master/src/dal_select2/widgets.py#L85

required file itself from Django: https://github.com/django/django/blob/master/django/contrib/admin/static/admin/css/autocomplete.css

Encountering this same issue (missing admin/css/autocomplete.css) - has it been patched?

Was this page helpful?
0 / 5 - 0 ratings