Closed gamesbook closed 3 years ago
You don't have django.contrib.admin inside INSTALLED_APPS ?
INSTALLED_APPS = [
# 3rd-party apps.
'crispy_forms',
'authtools',
'django_extensions',
'rest_framework',
'django_select2',
'dal', # django-autocomplete-light
'dal_select2',
'dal_legacy_static',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.humanize',
'django.contrib.staticfiles',
]
Interesting, what happens when you run ./manage.py findstatic admin/css/autocomplete.css
No matching file found for 'admin/css/autocomplete.css'
What is your Django version ?
Can you also look if it's properly installed in its path ?
In manage.py shell, import django, and get django.path or django.file, this is your Django directory, can you find the autocomplete.css anywhere in there ?
Does findstatic find it when you copy django/contrib/admin/static/.* into one of the known-to-work static directories of your project ? (hopefully you have at least one)
Not a good solution, but would be interesting to add that into perspective.
I'll quote from the original issue #620 -
jpic commented on 22 Jan 2019
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 ?
andybak commented on 22 Jan 2019
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."
So I am using version 1.11 (<2.0) and am assuming that this approach will work. But as noted:
TZanke commented on 8 May 2019
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
which has not been resolved; hence why I opened this issue.
Right, I'm surprised nobody made a PR yet
This follow-up comment was raised in #620 (which was already closed in 2019).
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