mirror of
https://gitee.com/smartchart/smartchart
synced 2025-05-05 00:59:25 +08:00
v5.2
This commit is contained in:
parent
c398bdbdcf
commit
182fd9e8b0
4
.gitignore
vendored
4
.gitignore
vendored
@ -1,2 +1,4 @@
|
|||||||
# Project exclude paths
|
# Project exclude paths
|
||||||
/venv/
|
/venv/
|
||||||
|
/.idea/
|
||||||
|
.gitignore
|
25
README.md
25
README.md
@ -16,7 +16,7 @@
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<img src="https://img.shields.io/badge/Release-V5.1-green.svg" alt="Downloads">
|
<img src="https://img.shields.io/badge/Release-V5.2-green.svg" alt="Downloads">
|
||||||
<a target="_blank" href="https://www.python.org/downloads/release/python-390/">
|
<a target="_blank" href="https://www.python.org/downloads/release/python-390/">
|
||||||
<img src="https://img.shields.io/badge/Python-3.6+-green.svg" />
|
<img src="https://img.shields.io/badge/Python-3.6+-green.svg" />
|
||||||
</a>
|
</a>
|
||||||
@ -132,16 +132,8 @@ API服务, smartchart可以让你轻松完成
|
|||||||
|
|
||||||
------------------------------------------------
|
------------------------------------------------
|
||||||
### 数据库支持说明
|
### 数据库支持说明
|
||||||
Smartchart理论上可以支持任意的数据源
|
Smartchart理论上可以支持任意的数据源, 详见文档中使用说明
|
||||||
|
|
||||||
- 默认支持的有mysql,sqlite,API,EXCEL数据, 你可以使用python连接器扩展任意数据源
|
|
||||||
- SQL Server 需安装 pip install pymssql
|
|
||||||
- ORACLE 需安装 pip install cx_Oracle
|
|
||||||
- GP,Postgrep 需安装 pip install psycopg2
|
|
||||||
- Impala 需安装 pip install impyla
|
|
||||||
- DB2 需安装 pip install ibm_db
|
|
||||||
- Python 需安装 pip install pandas, openpyxl
|
|
||||||
- ....
|
|
||||||
|
|
||||||
### 联系我们与帮助
|
### 联系我们与帮助
|
||||||
**安装及使用问题,可加以下微信号**
|
**安装及使用问题,可加以下微信号**
|
||||||
@ -201,6 +193,19 @@ v5.1
|
|||||||
- 增加一键实现滚动表格及图片轮播图形, 增加一键实现边框效果
|
- 增加一键实现滚动表格及图片轮播图形, 增加一键实现边框效果
|
||||||
- 增强体验去除默认加载地图js, 所有非常用js改为动态加载
|
- 增强体验去除默认加载地图js, 所有非常用js改为动态加载
|
||||||
v5.1.10 增加rem与px互转功能,优化模板开发体验
|
v5.1.10 增加rem与px互转功能,优化模板开发体验
|
||||||
|
v5.2
|
||||||
|
- 优化通用数据集开发
|
||||||
|
- 自由模式开发序号问题解决
|
||||||
|
- 增加频幕日志打印
|
||||||
|
- 增加样式可视化开发
|
||||||
|
- 增加仪表盘版本控制,备份恢复
|
||||||
|
- 增加仪表盘服务器之间同步
|
||||||
|
- 增加资源文件上传功能
|
||||||
|
- 增加对clickhouse,达梦等数据库支持
|
||||||
|
- 增加JDBC连接器
|
||||||
|
- Echarts升级到5.3
|
||||||
|
- 首页增加主题选择
|
||||||
|
- 仪表盘V,R,E增加图标防呆
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
10
manage.py
10
manage.py
@ -5,6 +5,15 @@ import sys
|
|||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
SMARTCHART = '''
|
||||||
|
_____ ___ ___ ___ _____ _____ _____ _ _ ___ _____ _____
|
||||||
|
/ ___/ / |/ | / | | _ \ |_ _| / ___| | | | | / | | _ \ |_ _|
|
||||||
|
| |___ / /| /| | / /| | | |_| | | | | | | |_| | / /| | | |_| | | |
|
||||||
|
\___ \ / / |__/ | | / / | | | _ / | | | | | _ | / / | | | _ / | |
|
||||||
|
___| | / / | | / / | | | | \ \ | | | |___ | | | | / / | | | | \ \ | |
|
||||||
|
/_____/ /_/ |_| /_/ |_| |_| \_\ |_| \_____| |_| |_| /_/ |_| |_| \_\ |_|
|
||||||
|
www.smartchart.cn version: 5.2
|
||||||
|
'''
|
||||||
"""Run administrative tasks."""
|
"""Run administrative tasks."""
|
||||||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'smartcharts.settings')
|
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'smartcharts.settings')
|
||||||
try:
|
try:
|
||||||
@ -15,6 +24,7 @@ def main():
|
|||||||
"available on your PYTHONPATH environment variable? Did you "
|
"available on your PYTHONPATH environment variable? Did you "
|
||||||
"forget to activate a virtual environment?"
|
"forget to activate a virtual environment?"
|
||||||
) from exc
|
) from exc
|
||||||
|
print(SMARTCHART)
|
||||||
execute_from_command_line(sys.argv)
|
execute_from_command_line(sys.argv)
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,34 +0,0 @@
|
|||||||
import time
|
|
||||||
import hashlib
|
|
||||||
import os
|
|
||||||
|
|
||||||
"""
|
|
||||||
参数说明:
|
|
||||||
id: 用户名(在smartchart平台中管理)
|
|
||||||
stamp: 时间戳(1970年1月1日到生成时间的毫秒数)
|
|
||||||
token: 采用sha1加密, token=SHA1(链接秘钥+stamp+id)
|
|
||||||
链接秘钥默认smartchart,
|
|
||||||
请在环境变量设定SMART_KEY替换(重要)
|
|
||||||
url: 登录成功后跳转链接
|
|
||||||
"""
|
|
||||||
|
|
||||||
SMART_CHART_URL = 'http://127.0.0.1:8000'
|
|
||||||
LOGIN_URL = SMART_CHART_URL + '/echart/smart_login?id={id}&stamp={stamp}&token={token}&url={url}'
|
|
||||||
SMART_KEY = os.environ.get('SMART_KEY', 'smartchart')
|
|
||||||
|
|
||||||
|
|
||||||
def get_smarturl(username, url='/'):
|
|
||||||
stamp = int(time.time() * 1000)
|
|
||||||
id = username
|
|
||||||
res = SMART_KEY + str(stamp) + id
|
|
||||||
token = hashlib.sha1(res.encode('utf-8')).hexdigest()
|
|
||||||
LOGIN_DICT = {
|
|
||||||
"id": id,
|
|
||||||
"stamp": stamp,
|
|
||||||
"token": token,
|
|
||||||
"url": url
|
|
||||||
}
|
|
||||||
|
|
||||||
# 拼接好的url,直接访问
|
|
||||||
visit_url = LOGIN_URL.format(**LOGIN_DICT)
|
|
||||||
return visit_url
|
|
@ -21,7 +21,7 @@ BASE_DIR = Path(__file__).resolve().parent.parent
|
|||||||
# See https://docs.djangoproject.com/en/3.1/howto/deployment/checklist/
|
# See https://docs.djangoproject.com/en/3.1/howto/deployment/checklist/
|
||||||
|
|
||||||
# SECURITY WARNING: keep the secret key used in production secret!
|
# SECURITY WARNING: keep the secret key used in production secret!
|
||||||
SECRET_KEY = '#$lc1_v_)tof%192ew9fow#o+1#d1qu84d@c11y*sgjqkkl*&b'
|
SECRET_KEY = '#$lc1_v_)tof%192ew9fww#o+1#d1qu84d@c11y*sgjqkkl*&b'
|
||||||
|
|
||||||
# SECURITY WARNING: don't run with debug turned on in production!
|
# SECURITY WARNING: don't run with debug turned on in production!
|
||||||
DEBUG = True
|
DEBUG = True
|
||||||
@ -130,6 +130,7 @@ USE_TZ = False
|
|||||||
# Static files (CSS, JavaScript, Images)
|
# Static files (CSS, JavaScript, Images)
|
||||||
# https://docs.djangoproject.com/en/3.1/howto/static-files/
|
# https://docs.djangoproject.com/en/3.1/howto/static-files/
|
||||||
# 开启STATIC_ROOT后执行: python manage.py collectstatic
|
# 开启STATIC_ROOT后执行: python manage.py collectstatic
|
||||||
|
# 执行完后注释掉
|
||||||
# STATIC_ROOT = os.path.join(BASE_DIR, "static")
|
# STATIC_ROOT = os.path.join(BASE_DIR, "static")
|
||||||
STATIC_URL = '/static/'
|
STATIC_URL = '/static/'
|
||||||
STATICFILES_DIRS = [
|
STATICFILES_DIRS = [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user