02-插件介绍

插件下载地址

# 1. 手动在APP里创建 templates 文件(html写在里面)
 
# 2. 在app中创建 static 文件夹 :新建 css / js(jquery) / img(图片) / plugins(插件) 
 
# 3. 下载BootStrap:  下载-->用于生产环境的下载-->解压-->放到plugins文件夹下 
        https://v3.bootcss.com/
 
# 4. 下载图标组件 : 点击直接下载-->解压-->放到plugins文件夹下
        https://fontawesome.dashgame.com/
 
# 5. 下载jQuery: jquery.com-->Download jQuery--> 选择Download the compressed, production jQuery 3.6.1-->在pycharm中的static/js创建一个.js文件-->内容拷贝进去
        https://jquery.com/
 
# 6. 时间插件-->放到plugins文件夹下: 
                    https://codeload.github.com/smalot/bootstrap-datetimepicker/zip/refs/heads/master

引入插件

 # - 在html最顶部
                {% load static %}
 
            - 引入css插件
                 <link rel="stylesheet" href="{% static 'plugins/bootstrap-3.4.1/css/bootstrap.css' %}">
 
            - 引入图片
 
                <img src="{% static 'img/a3.png' %}" alt="">
             
 
            - 在body下方引入jquery.js
                <script src="{% static 'js/jquery-3.6.1.min.js' %}"></script>
 
            - 引入 bootstrap.js
                <script src="{% static 'plugins/bootstarap/js/bootstarap.css'%}"></script>

posted @ 2023-01-04 15:00  测试圈的彭于晏  阅读(54)  评论(0)    收藏  举报