django结合smartchart实现系统的数据看板页面

server/2024/9/23 5:59:40/

1、安装smartchart 

pip3 install smartchart 

2、在你的setting.py的INSTALL_APPS中加入’smart_chart.echart'

3、MIDDLEWARE 中注释掉XFrameOptionsMiddleware

4、检查确保在Templates的设定处有DIRS的相关设定

TEMPLATES = [{'BACKEND': 'django.template.backends.django.DjangoTemplates','DIRS': [BASE_DIR / 'templates'],   #此处需要有'APP_DIRS': True,   #也要有.....},
]

5、setting.py中设定为中国时区

LANGUAGE_CODE = 'zh-hans'TIME_ZONE = 'Asia/Shanghai'USE_I18N = TrueUSE_L10N = TrueUSE_TZ = False  # 此处必须为False

6、url.py中加入引用

from django.conf.urls import includefrom django.views.generic import RedirectView

注意,如果原来已有from django.urls import include ,则注意新的引用可以写为:

from django.conf.urls import include as inclu

url.py的urlp


http://www.ppmy.cn/server/19267.html

相关文章

端点安全管理系统干什么用的 有哪些好用?

你听说过: 端点安全管理系统吗? 我们一起来了解一下啊 一、什么是端点安全管理系统? 端点安全管理系统(Endpoint Security Management System)是一种专门用于保护企业内部网络终端设备的综合性安全解决方案。 这些终…

table表格导出为excel文件并设置样式

table表格导出为excel文件并设置样式 安装xlsx、xlsx-style-medalsoft 的 npm 包: npm i xlsx xlsx-style-medalsoft设置全局: Vue.prototype.$XLSX XLSX; // 设置全局 Vue.prototype.$XLSXStyle XLSXStyle; // 设置全局具体代码实现: …

洛谷 P3806 [模板] 点分治 1 题解

【模板】点分治 1 题目描述 给定一棵有 n n n 个点的树,询问树上距离为 k k k 的点对是否存在。 输入格式 第一行两个数 n , m n,m n,m。 第 2 2 2 到第 n n n 行,每行三个整数 u , v , w u, v, w u,v,w,代表树上存在一条连接 u …

大模型咨询培训老师叶梓:利用知识图谱和Llama-Index增强大模型应用

大模型(LLMs)在自然语言处理领域取得了显著成就,但它们有时会产生不准确或不一致的信息,这种现象被称为“幻觉”。为了提高LLMs的准确性和可靠性,可以借助外部知识源,如知识图谱。那么我们如何通过Llama-In…

【设计模式】11、flyweight 享元模式

文章目录 十一、flyweight11.1 pool 连接池11.1.1 pool_test.go11.1.2 pool.go11.1.3 conn.go 11.2 chess_board11.2.1 chess_test.go11.2.2 chess.go 十一、flyweight https://refactoringguru.cn/design-patterns/flyweight 大量重复的对象, 如果很消耗资源, 没必要每次都初…

什么是redis服务+redis服务数据类型有哪些??

一、背景: 在运维工作会一定会接触到数据库服务,例如oracle数据库、mysql数据库、redis数据库等,这里要介绍的就是redis数据库。 二、什么是redis?? Redis,英文全称是Remote Dictionary Server(…

Day 20 Linux的WEB服务——apache

WEB服务简介 目前主流的web服务器软件 Linux:apache , nginx Windows-server:IIS 服务器安装nginx或apache后,叫做web服务器(又称WWW服务器) web服务器软件属于C/S框架模型 web服务器是一种被动程序只…

Hybrid Homomorphic Encryption:SE + HE

参考文献: [NLV11] Naehrig M, Lauter K, Vaikuntanathan V. Can homomorphic encryption be practical?[C]//Proceedings of the 3rd ACM workshop on Cloud computing security workshop. 2011: 113-124.[MJS16] Maux P, Journault A, Standaert F X, et al. To…