Giter Club home page Giter Club logo

stockvisualization's Introduction

Tushare股票数据可视化平台

基于python3.9.5Django3.1.12 实现Tushare股票数据可视化平台。

距离上次编辑次项目已经时隔一年多了,自认为这一年在水平上还是有不小提升的,遂决定将此项目重构,同时也能梳理下所学知识点。

目前开发工作还在进行中,但老的版本以基本不可用,遂临时将开发分支设为主分支。如有需要可切回老版本。

示例

主要功能:

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

安装

克隆项目至本地:git clone https://github.com/1251240000/StcokVisualization.git pip安装环境: pip3 install -r requirements.txt

配置

迁移数据库

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

生成/刷新测试数据

执行:python3 manage.py refresh_data

创建超级用户

执行:python3 manage.py createsuperuser

配置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/

stockvisualization's People

Contributors

1251240000 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.