Django + pyecharts 实现数据可视化

1 创建django项目 :Visualization and  APP :Demo

>>django-admin startproject Visualization 

>>python manage.py startapp Demo

2 配置settings.py

①插入Demo

②配置模板路径

  ----BASE_DIR = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))

  ----TEMPLATES = [

      'DIRS': [os.path.join(BASE_DIR, 'templates').replace('\\', '/')], # 修改 模板目录 ]

  ----STATIC_URL = '/static/'

    STATIC_ROOT = os.path.join(BASE_DIR, 'static_collected')

  ----补充  

  # LANGUAGE_CODE = 'en-us'
  LANGUAGE_CODE = 'zh-hans' # 简体中文

  # TIME_ZONE = 'UTC'
  TIME_ZONE = 'Asia/Shanghai' # 时区

③在APP Demo里创建templates和static,templates里新建test.html

 

………………等待更新…………

转载于:https://www.cnblogs.com/nuister/p/pyecharts.html

你可能感兴趣的:(Django + pyecharts 实现数据可视化)