Проблема с owl.carousel.min.js?ver=1.0, а owl.carousel.min.js работает нормально
Я создал проект с помощью django и создал приложения admin_app и customer_app. В customer_app происходит ошибка со сторонними библиотеками и ошибка типа:Refused to execute script from 'http://127.0.0.1:8000/js/owl.carousel.min.js?ver=1.0' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled. код для settings.py:
BASE_DIR = Path(__file__).resolve().parent.parent
TEMPLATES_DIR = Path(BASE_DIR, 'templates')
ADMIN_STATIC_DIR = Path(BASE_DIR, 'admin_app', 'static')
CUSTOMER_STATIC_DIR = Path(BASE_DIR, 'customer_app', 'static')
STATIC_URL = '/static/'
STATICFILES_DIRS = [
ADMIN_STATIC_DIR,
CUSTOMER_STATIC_DIR,
]
<<<Код сценария файла base.html следующий:
<script src="{% static 'customer_app/js/jquery-3.6.0.min.js' %}"></script>
<script src="{% static 'customer_app/js/asyncloader.min.js' %}"></script>
<!-- JS bootstrap -->
<script src="{% static 'customer_app/js/bootstrap.min.js' %}"></script>
<!-- owl-carousel -->
<script src="{% static 'customer_app/js/owl.carousel.min.js' %}"></script>
<!-- counter-js -->
<script src="{% static 'customer_app/js/jquery.waypoints.min.js' %}"></script>
<script src="{% static 'customer_app/js/jquery.counterup.min.js' %}"></script>
<!-- popper-js -->
<script src="{% static 'customer_app/js/popper.min.js' %}"></script>
<script src="{% static 'customer_app/js/swiper-bundle.min.js' %}"></script>
<!-- Iscotop -->
<script src="{% static 'customer_app/js/isotope.pkgd.min.js' %}"></script>
<script src="{% static 'customer_app/js/jquery.magnific-popup.min.js' %}"></script>
<script src="{% static 'customer_app/js/slick.min.js' %}"></script>
<script src="{% static 'customer_app/js/streamlab-core.js' %}"></script>
<script src="{% static 'customer_app/js/script.js' %}"></script>
Я решаю вышеуказанную ошибку с помощью работающего эффекта библиотеки owl.carousel.js