美文网首页
django simple ui 无法输入登录

django simple ui 无法输入登录

作者: jojo1313 | 来源:发表于2022-05-17 14:38 被阅读0次

    Django-1.11.29
    simpleui-4.0.2

    image.png

    原因是在线调用css js失效
    替换调用本地静态文件
    方法1: 替换成其他的cdn源
    vim /usr/local/python/python2.7.9/lib/python2.7/site-packages/simpleui/templates/admin/includes/js-part.html
    <script src="https://cdn.jsdelivr.net/npm/vue@2.6.11/dist/vue.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/element-ui@2.13.1/lib/index.js"></script>

    vim /usr/local/python/python2.7.9/lib/python2.7/site-packages/simpleui/templates/admin/includes/css-part.html
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/element-ui@2.13.1/lib/theme-chalk/index.css">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.13.0/css/all.min.css">

    方法2:替换调用本地静态文件
    vim /usr/local/python/python2.7.9/lib/python2.7/site-packages/simpleui/templates/admin/includes/js-part.html
    <script type="text/javascript" src="{% static '/admin/simpleui-x/js/vue.min.js' %}"></script>
    <script type="text/javascript" src="{% static '/admin/simpleui-x/elementui/index.js' %}"></script>

    vim /usr/local/python/python2.7.9/lib/python2.7/site-packages/simpleui/templates/admin/includes/css-part.html
    <link rel="stylesheet" href="{% static '/admin/simpleui-x/elementui/theme-chalk/index.css' %}">
    <link rel="stylesheet" href="{% static '/admin/simpleui-x/fontawesome-free-5.8.1-web/css/all.min.css' %}">

    nginx 配置文件中配置本地静态文件路径
    location /static {
    # Django项目静态文件的路径
    alias /opt/platform/static;
    }

    相关文章

      网友评论

          本文标题:django simple ui 无法输入登录

          本文链接:https://www.haomeiwen.com/subject/vdfnurtx.html