zhangbinchao / testolinebc Goto Github PK
View Code? Open in Web Editor NEW在线考试系统(新版在https://github.com/zhangbinchao/TestOnline2)
在线考试系统(新版在https://github.com/zhangbinchao/TestOnline2)
根据你在“Django+xadmin打造在线考试系统(五)完结”中介绍的步骤,
先通过pyCharm操作,clone下项目代码,
1建立虚拟环境
2安装第三方库
根据requirement.txt安装
3配置数据库,在setting.py中:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'mydb', #数据库名
'USER': 'root', #账号
'PASSWORD': '123', #密码
'HOST': '127.0.0.1', #IP
'PORT': '3306',
}
}
4生成数据库,
python manage.py makemigrations
此时报错,截取部分提示:
File "F:\PythonWorks\Django\TestOlinebc\venv\lib\site-packages\django\db\backends\base\base.py", line 21
6, in ensure_connection
self.connect()
File "F:\PythonWorks\Django\TestOlinebc\venv\lib\site-packages\django\db\backends\base\base.py", line 19
4, in connect
self.connection = self.get_new_connection(conn_params)
像是没有与数据库连接好,我的电脑没有安装mysql,django自带sqlite3数据库。
不知你用的mysql版本是哪个?其中还需要其他如何配置?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.