You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 4, 2024. It is now read-only.
It complains about django is not defined and (django.jQuery) is highlighted in index.html
Its weird as it works fine when using Django dev server.
Any idea?
static files are missing when collected?
Using Django 2.2 and Python 3.6
The text was updated successfully, but these errors were encountered:
Don't think it's a bug.
You probably should let Apache serve static files (as noted in the Django docs somewhere), but this app overrides some of the static files and not others.
I followed the Apache docs here and it seems to work for me: https://httpd.apache.org/docs/2.4/en/rewrite/remapping.html#multipledirs
Here's what I have in my Apache site config:
# serve static admin files, as noted in django docs
<Directory /usr/local/lib/python3.6/dist-packages/django/contrib/admin/static/admin/>
AllowOverride None
Require all granted
</Directory>
Alias /static/admin "/usr/local/lib/python3.6/dist-packages/django/contrib/admin/static/admin"
# serve django-admin-bootstrap's own static files for
Alias /static/bootstrap_admin /usr/local/lib/python3.6/dist-packages/bootstrap_admin/static/bootstrap_admin
# serve django-admin-bootstrap's version of the admin's static files in priority
RewriteEngine on
RewriteCond /usr/local/lib/python3.6/dist-packages/bootstrap_admin/%{REQUEST_URI} -f
RewriteRule "^(.+)" "/usr/local/lib/python3.6/dist-packages/bootstrap_admin/$1" [L]
The paths should match your own installation of course.
If it works for you, it might be worht adding it to the docs.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
It complains about django is not defined and (django.jQuery) is highlighted in index.html
Its weird as it works fine when using Django dev server.
Any idea?
static files are missing when collected?
Using Django 2.2 and Python 3.6
The text was updated successfully, but these errors were encountered: