1、wangEditor(Web 富文本编辑器)
用CDN链接后,直接复制就可以使用:
<div id="div1">
<p>欢迎使用 <b>wangEditor</b> 富文本编辑器</p>
</div>
<!-- 引入 wangEditor.min.js -->
<script type="text/javascript">
const E = window.wangEditor
const editor = new E('#div1')
// 或者 const editor = new E( document.getElementById('div1') )
editor.create()
</script>
详细用法查阅官网:
https://www.wangeditor.com/doc/
2、ECharts(画可视化图像)
很简单,可以直接用官方的例子修改里面的数据即可。
<script src="https://cdn.jsdelivr.net/npm/echarts@5.2.2/dist/echarts.min.js"></script>
详情用法查阅官网:
https://echarts.apache.org/examples/zh/index.html
3、tailwind(前端CSS的插件)
用cdn加载会有样式限制,但是对于平时练习来说是够够的啦!很方便,查文档就能组合想要的样式。
<link href="https://unpkg.com/tailwindcss@^2/dist/tailwind.min.css" rel="stylesheet">
详细用法查阅官网:
https://www.tailwindcss.cn/docs/installation
4、boostrap(前端CSS的插件)
boostrap感觉没有tailwind好用,不过里面的模态框(model)挺好用的
{% load bootstrap4 %}
{% bootstrap_css %}
{% bootstrap_javascript jquery='full' %}
{% bootstrap_messages %}
详细用法查阅官网:
https://v4.bootcss.com/
5、django-allauth插件
这个我几乎在所有django项目中都会用,特别方便,主要可以帮助你解决你的项目需要第三方登录的问题,我经常用来作为用户登陆的框架,直接复制里面templates的accounts文件到项目里面,改写前端页面。
settings.py
INSTALLED_APPS = [
···
'allauth',
'allauth.account',
'allauth.socialaccount',
···
]
SITE_ID = 1
LOGIN_REDIRECT_URL = '/profile/' #allauth注册登陆后自动跳转到首页
ACCOUNT_LOGOUT_REDIRECT_URL = '/accounts/login/'