Git Product home page Git Product logo

stcokvisualization's Introduction

Tushare股票数据可视化平台

基于python3.8.0Django2.1.8 实现Tushare股票数据可视化平台。

一个示例

主要功能:

  • 股票代码搜索
  • K线图、平均线绘制
  • 模拟股票交易
  • 时间序列预测

安装

克隆项目至本地:git clone https://github.com/1251240000/sdcs.git

pip安装环境: pip install -Ur requirements.txt

配置

迁移数据库

执行:python3 manage.py makemigrations 之后执行:python3 manage.py migrate

生成/刷新测试数据

执行:python3 manage.py refresh_data

创建超级用户

执行:python3 manage.py createsuperuser

配置验证码

如果需要使用验证码模块,你需要申请阿里云短信签名及模版,并修改ui/sms.py

accessKeyId = '你的AccessKey ID'
accessSecret = '你的AccessKey Secret'

def SendSms(pnum, vcode):

    # ··· ···
    request.add_query_param('SignName', "签名名称")
    request.add_query_param('TemplateCode', "模版CODE")
    # ··· ···
配置wsgi + Nginx

如果需要配置wsgi+Nginx ,你需要:

  • 配置Nginx支持uwsgi及虚拟目录:
server {
    listen       8000;

    location / {
    include uwsgi_params;
    uwsgi_pass 0.0.0.0:8001;
    }

    location /static {
        alias 静态文件目录;
    }
}
  • 收集静态文件:python3 manage.py collectstatic

  • 配置uwsgi.ini:

[uwsgi]
socket = 0.0.0.0:8000
chdir = 目录
wsgi-file = 目录/wsgi.py
processes = 4
threads = 2
master = True
pidfile = uwsgi.pid
daemonize = uwsgi.log

运行

执行: python3 manage.py runserver 0.0.0.0:8000uwsgi uwsgi.ini

浏览器打开: http://127.0.0.1:8000/

stcokvisualization's People

Contributors

1251240000 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.