# Local Environment File Readme
This folder exists for users to add any and all python files that contain private data in them to them.
The minimum required files that the user must create are:
1. localapikeys.py
* Must define the following variables in this file:
* ```google_cse_api_key='api_key_string'```
* ```google_cse_eng_id='engine_id_string'```
* To acquire a google API key to use the custom search engine, a google API account must be made:
* Acquiring API Key: https://developers.google.com/custom-search/v1/overview
* Google CSE API Tutorial: https://www.youtube.com/watch?v=ScdA3q9y2Y8
2. localuser.py
* Must contain declaration of variable django_production_key, which is a 50-digit secret key
* In form ```django_production_key = 'secret_key_string'```
* There are various ways to generate random keys--for instance, DJango automatically generates one when a new project is started.
* This stackoverflow article explains how to generate secret keys: https://stackoverflow.com/questions/4664724/distributing-django-projects-with-unique-secret-keys
* This website has an automatic secret key generator: https://www.miniwebtool.com/django-secret-key-generator/
3. localwebproxy.py
## Local API Key File Example
**Note**: The APIKey numbers below are not valid--you will need to generate them yourself
```#!/usr/bin/env python
""" API Key Local Definitions File
The purpose of this local file is to store all of the user's sensitive
API keys so that they don't accidentally place them into the guts of their
code that gets uploaded to the public git repository. For privacy reasons,
this file has been added to the repository and restricted from the
work-tree search so that it doesn't get accidentally added when triggering
a git commit -a, eventually being pushed up to the remote master. Usage
notes are in the local API keys subsection.
"""
# =============================================================================
# [1] Document Metadata
# =============================================================================
__author__ = 'Lennard Streat'
__copyright__ = 'Network of Intel African Americans 2019, PyStockAnalyze Project'
__credits__ = ['Lennard Streat', 'Princton Brennan']
__license__ = 'MIT'
__version__ = '1.0'
__email__ = 'nia.stem.club'
# =============================================================================
# [2] Local API Keys
# -----------------------------------------------------------------------------
# - To use this file the user should define global variables here that are then
# utilized in the code; Some example variables have been added for reference
# =============================================================================
# Google Custom Search Engine
google_cse_api_key='012345678901234567890123456789012345678'
google_cse_eng_id='012345678901234567890:01234567890'
```
## Local User File Example
**Note**: The production secret key displayed below is just to give an example of how long the key is, but isn't a particularly good secret key--though it works for debug purposes
```
#!/usr/bin/env python
""" General User Local Definitions File
The purpose of this local file is to store all of the user's sensitive
variables so that they don't accidentally place them into the guts of their
code that gets uploaded to the public git repository. For privacy reasons,
this file has been added to the repository and restricted from the
work-tree search so that it doesn't get accidentally added when triggering
a git commit -a, eventually being pushed up to the remote master. Usage
notes are in the local user parameters subsection.
"""
# =============================================================================
# [1] Document Metadata
# =============================================================================
__author__ = 'Lennard Streat'
__copyright__ = 'Network of Intel African Americans 2019, PyStockAnalyze Project'
__credits__ = ['Lennard Streat', 'Princton Brennan']
__license__ = 'MIT'
__version__ = '1.0'
__email__ = 'nia.stem.club'
# =============================================================================
# [2] Local User Parameters
# -----------------------------------------------------------------------------
# - To use this file the user should define global variables here that are then
# utilized in the code; Some example variables have been added for reference
# =============================================================================
# Django production key should be kept private
# Generate one from here: https://djecrety.ir/
django_production_key='01234567890123456789012345678901234567890123456789'
# Database Passwords
sqlite_pass=''
# User Passwords
user_admin_pass=''
```
## Local Web Proxy File Example
**Note**: The proxy port and host used below point to the default localhost, if a proxy is required, these need to be changed; If no proxy is to be used, the proxy_enabled flag needs to be made false
```
#!/usr/bin/env python
""" Web Proxy Definitions File
The purpose of this local file is to store all of the user's proxy-related
information, so that these don't get uploaded to the public repository.
"""
# =============================================================================
# [1] Document Metadata
# =============================================================================
__author__ = 'Lennard Streat'
__copyright__ = 'Network of Intel African Americans 2019, PyStockAnalyze Project'
__credits__ = ['Lennard Streat', 'Princton Brennan']
__license__ = 'MIT'
__version__ = '1.0'
__email__ = 'nia.stem.club'
# =============================================================================
# [2] Local Proxy Parameters
# -----------------------------------------------------------------------------
# - To use this file the user should define global variables here that are then
# utilized in the code; Some example variables have been added for reference
# =============================================================================
# Disable when working in an environment without an proxy server
proxy_enabled = True
# To supply calls to httplib2
global_proxy_host = '127.0.0.1'
global_proxy_port = 80
# To supply calls to response
global_proxy_dict = {'https' : ':'.join([global_proxy_host,str(global_proxy_port)])}
```
没有合适的资源?快使用搜索试试~ 我知道了~
Django-Web-应用程序分析股票数据
共156个文件
py:87个
sample:13个
md:9个
2 下载量 94 浏览量
2024-03-24
19:05:13
上传
评论
收藏 40.64MB ZIP 举报
温馨提示
Django Web 应用程序获取股票数据,对其进行分析并呈现图形用户界面。 注意:如果您使用的是 Linux/Mac OS,请跳到步骤 5 并假设适用于 Git Bash 的所有步骤都适用于本机终端 环境设置 安装Python 3.7.2(勾选“将Python 3.7添加到PATH”) https://www.python.org/downloads/release/python-372/ 安装代码编辑器 选项 1:PyCharm(https://www.jetbrains.com/pycharm/download/#section=windows) 选项 2:Sublime ( https://www.sublimetext.com/3 ) 注意:确保您的编辑器位于 Windows 路径上或将路径保存在记事本中(将在后续步骤中使用) 要激活虚拟环境,请输入以下命令: activate 将以下行添加到以下文件:数据库密码声明上方的localuser.py django_production_key='123'
资源推荐
资源详情
资源评论
收起资源包目录
Django-Web-应用程序分析股票数据 (156个子文件)
config 298B
materialize.css 175KB
materialize.min.css 139KB
google_db_styles.css 820B
styles.css 121B
styles.css 121B
description 73B
develop 187B
develop 41B
exclude 240B
stocks_animation.gif 4.6MB
.gitignore 132B
.gitignore 13B
.gitignore 13B
.gitignore 13B
HEAD 187B
HEAD 187B
HEAD 33B
HEAD 24B
home.html 16KB
base.html 3KB
index.html 1KB
base.html 1011B
base.html 599B
base.html 573B
dashboard.html 285B
base.html 138B
pack-dcbfe45c0241f8c4054e09e4a8a69e4d9c38c9d2.idx 39KB
index 17KB
stocks_animation.jpeg 22KB
default-image.jpg 13KB
materialize.js 374KB
materialize.min.js 177KB
main.js 1KB
main.js 1KB
LICENSE 1KB
LICENSE 1KB
README.md 6KB
README.md 4KB
README.md 4KB
README.md 2KB
README.md 646B
README.md 322B
README.md 322B
README.md 233B
README.md 0B
.gitignore.orig 120B
pack-dcbfe45c0241f8c4054e09e4a8a69e4d9c38c9d2.pack 35.68MB
packed-refs 2KB
stock.png 74KB
stock.png 74KB
NIA_STEM_LOGO.png 36KB
NIA_STEM_LOGO_white.png 13KB
test_alphavantage_crypto.py 7KB
test_alphavantage_crypto.py 6KB
settings.py 4KB
settings.py 4KB
settings.py 3KB
googleapi.py 3KB
googleapi.py 3KB
views.py 2KB
urls.py 1KB
urls.py 1KB
views.py 1KB
urls.py 927B
urls.py 842B
views.py 715B
test_google_client_api.py 690B
manage.py 565B
manage.py 562B
manage.py 556B
0001_initial.py 495B
wsgi.py 423B
wsgi.py 420B
wsgi.py 411B
urls.py 381B
urls.py 230B
views.py 214B
urls.py 211B
urls.py 146B
urls.py 146B
urls.py 144B
views.py 143B
views.py 142B
views.py 138B
forms.py 130B
apps.py 116B
apps.py 109B
apps.py 105B
apps.py 105B
apps.py 103B
apps.py 103B
apps.py 101B
models.py 92B
forms.py 84B
admin.py 66B
admin.py 66B
admin.py 66B
admin.py 66B
admin.py 66B
共 156 条
- 1
- 2
资源评论
Omer_
- 粉丝: 1672
- 资源: 31
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- pta题库答案c语言之树结构2ListLeaves.zip
- pta题库答案c语言之树结构1树的同构.zip
- 基于C++实现民航飞行与地图简易管理系统可执行程序+说明+详细注释.zip
- pta题库答案c语言之复杂度1最大子列和问题.zip
- 三维装箱问题(Three-Dimensional Bin Packing Problem,3D-BPP)是一个经典的组合优化问题
- 以下是一些关于Linux线程同步的基本概念和方法.txt
- 以下是一个简化的示例,它使用pygame库来模拟烟花动画的框架.txt
- Linux线程同步机制深度解析与实用指南.zip
- PTA题库C语言解题策略与实战.rar
- SVPWM控制技术的simulink建模与仿真【包括simulink模型,参考文献,操作步骤】
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功