代码拉取完成,页面将自动刷新
同步操作将从 zcystart/chemlab 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
###在线演示环境
http://101.34.18.118:8002/
(图片未压缩,所以加载有点慢)
学生账号:19001234
学生密码:xm123456
管理员账号:admin
管理员密码:admin123
教师账号: x100x
教师密码: x100x123
在Python3.7,Django2.2,MySQL8.0 版本下测试运行成功,windows,linux平台。
首先安装好运行环境,配置好python虚拟环境
1.安装requirements.txt依赖包(环境)
pip install -r requirements.txt
2.修改settings.py下的数据库配置
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
# 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
'NAME': 'lms',
'HOST': '127.0.0.1',
'PORT': '3306',
'USER': 'root',
'PASSWORD': 'root'
}
}
3.导入数据库文件lms.sql
python manage.py makemigrations
python manage.py migrate
#上面两步进行迁移,完成数据库表的建立
4.命令行输入
python manage.py runserver
#默认端口开在127.0.0.1:8000
PS:#创建超级管理员用户
python manage.py createsuperuser
5.然后浏览器打开localhost:8080/127.0.0.1:8000/进入管理系统
###页面展示
学生端
管理端
###导入药品列表说明 文件 lms/static/lms/example/xls/Medicine-2022-01-27.xls
采用了开源的simpleui
2022-6-21更新 #错误提示
query = query.decode(errors='replace')
AttributeError: 'str' object has no attribute 'decode'
点击最后一条链接, 将decode改为encode
def last_executed_query(self, cursor, sql, params):
# With MySQLdb, cursor objects have an (undocumented) "_executed"
# attribute where the exact query sent to the database is saved.
# See MySQLdb/cursors.py in the source distribution.
query = getattr(cursor, '_executed', None)
if query is not None:
query = query.decode(errors='replace')
return query
query = query.encode(errors='replace')
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。