惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

酷 壳 – CoolShell
酷 壳 – CoolShell
H
Hacker News: Front Page
P
Palo Alto Networks Blog
T
ThreatConnect
Apple Machine Learning Research
Apple Machine Learning Research
博客园_首页
T
True Tiger Recordings
P
Privacy & Cybersecurity Law Blog
B
Blog
IT之家
IT之家
Last Week in AI
Last Week in AI
F
Full Disclosure
Hacker News: Ask HN
Hacker News: Ask HN
C
Comments on: Blog
Microsoft Azure Blog
Microsoft Azure Blog
C
Cybersecurity and Infrastructure Security Agency CISA
Microsoft Security Blog
Microsoft Security Blog
博客园 - 【当耐特】
N
News and Events Feed by Topic
NISL@THU
NISL@THU
腾讯CDC
雷峰网
雷峰网
Security Latest
Security Latest
李成银的技术随笔
M
Microsoft Research Blog - Microsoft Research
L
LangChain Blog
L
Lohrmann on Cybersecurity
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
C
Check Point Blog
Y
Y Combinator Blog
Recent Announcements
Recent Announcements
博客园 - Franky
N
News | PayPal Newsroom
V
V2EX
A
About on SuperTechFans
The Register - Security
The Register - Security
月光博客
月光博客
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Google Online Security Blog
Google Online Security Blog
MyScale Blog
MyScale Blog
Cisco Talos Blog
Cisco Talos Blog
Vercel News
Vercel News
WordPress大学
WordPress大学
C
Cyber Attacks, Cyber Crime and Cyber Security
The Hacker News
The Hacker News
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
爱范儿
爱范儿
A
Arctic Wolf
L
LINUX DO - 最新话题
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More

博客园 - 木子东晓东

当androidStudio下载gradle出错时,切换到国内镜像的方法 DevEco Studio 调用hdc的方法 运行Flutter 真机运行安卓报错 将字符串数字转换为薪资类型10000转换为10,000 - 木子东晓东 使用magicAPI对接python 文件,上传参数获取不到回参问题 使用python 实现自动发送邮件功能,并上传到宝塔 py集成宝塔,flask已加入模块,无法实现自动发送邮件功能 谷歌浏览器降级的方法-及chromedriver 下载文件 若依框架导入阿里OSS报错问题解决方案 解决若依框架与tailwindcss 样式冲突问题 若依框架前期启动工作 运行若依时报错 MAC 使用docker 启动宝塔 MAC flutter初步学习 2 iOS 审核被拒,日志中找不到苹果返回的creashlog的解决办法 flutter学习之添加第三方应用 MAC flutter初步学习 python Django 连接数据库失败的解决方法 Python之学习菜鸟教程踩的坑
Python学习之环境搭建
木子东晓东 · 2018-10-29 · via 博客园 - 木子东晓东

一、根据菜鸟教程的逐步学习,终于python链接上了MySQLite 服务器,在此期间遇到了很多的坑,把坑写下来

让自己能够充分的记录学习

首先下载几个搭建python环境的软件

1、Pycharm 主要编码python语言的软件(企业级破解版)

2、下载MySQLite工具

3、使用Django 框架来编写html页面,简单方便

二、配置环境中,如果遇到127.0.0.1打不开的情况或者没办法显示正确的页面时

可以在终端使用 $ python manage.py runserver 0.0.0.0:8000

来从新启动,如果现实ip被占用,可以上网查,然后逐条删除

$ python manage.py migrate 使用这个方法的过程中会显示连接不到服务器

耐心一点,首先开启MySQLite,

在settings.py中设置用户信息

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'mysql',
'USER': 'root',
'PASSWORD': 'ldx12138',
'HOST':'127.0.0.1',
'PORT':'3306',
}
}

NAMEL为mysql,为初始值
PASSWORD为下载MySQLite自己设置的一定得记住
然后再运行

$ python manage.py migrate   # 创建表结构

$ python manage.py makemigrations TestModel  # 让 Django 知道我们在我们的模型有一些变更
$ python manage.py migrate TestModel   # 创建表结构
就ok了