xingxingzaixian / django-vue3.2-online-exam Goto Github PK
View Code? Open in Web Editor NEW在线考试系统,开发中......
Home Page: http://exam.xingxingzaixian.fun/#/exam/list
License: MIT License
在线考试系统,开发中......
Home Page: http://exam.xingxingzaixian.fun/#/exam/list
License: MIT License
解决完成编辑.env得数据库连接配置后执行:
[root@bf179903968b backend]# pipenv run makemigrations
Loading .env environment variables...
No changes detected
没有问题成功执行
但是执行数据库迁移生成时报错了:
[root@bf179903968b backend]# pipenv run migrate
Loading .env environment variables...
Operations to perform:
Apply all migrations: admin, auth, contenttypes, exam, sessions
Running migrations:
Applying contenttypes.0001_initial... OK
Applying admin.0001_initial...Traceback (most recent call last):
File "/root/.local/share/virtualenvs/backend-uuyuvXgx/lib/python3.8/site-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "/root/.local/share/virtualenvs/backend-uuyuvXgx/lib/python3.8/site-packages/django/db/backends/mysql/base.py", line 73, in execute
return self.cursor.execute(query, args)
File "/root/.local/share/virtualenvs/backend-uuyuvXgx/lib/python3.8/site-packages/pymysql/cursors.py", line 158, in execute
result = self._query(query)
File "/root/.local/share/virtualenvs/backend-uuyuvXgx/lib/python3.8/site-packages/pymysql/cursors.py", line 325, in _query
conn.query(q)
File "/root/.local/share/virtualenvs/backend-uuyuvXgx/lib/python3.8/site-packages/pymysql/connections.py", line 549, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
File "/root/.local/share/virtualenvs/backend-uuyuvXgx/lib/python3.8/site-packages/pymysql/connections.py", line 779, in _read_query_result
result.read()
File "/root/.local/share/virtualenvs/backend-uuyuvXgx/lib/python3.8/site-packages/pymysql/connections.py", line 1157, in read
first_packet = self.connection._read_packet()
File "/root/.local/share/virtualenvs/backend-uuyuvXgx/lib/python3.8/site-packages/pymysql/connections.py", line 729, in _read_packet
packet.raise_for_error()
File "/root/.local/share/virtualenvs/backend-uuyuvXgx/lib/python3.8/site-packages/pymysql/protocol.py", line 221, in raise_for_error
err.raise_mysql_exception(self._data)
File "/root/.local/share/virtualenvs/backend-uuyuvXgx/lib/python3.8/site-packages/pymysql/err.py", line 143, in raise_mysql_exception
raise errorclass(errno, errval)
pymysql.err.OperationalError: (1824, "Failed to open the referenced table 'tbl_user'")
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "manage.py", line 15, in <module>
execute_from_command_line(sys.argv)
File "/root/.local/share/virtualenvs/backend-uuyuvXgx/lib/python3.8/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
utility.execute()
File "/root/.local/share/virtualenvs/backend-uuyuvXgx/lib/python3.8/site-packages/django/core/management/__init__.py", line 413, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/root/.local/share/virtualenvs/backend-uuyuvXgx/lib/python3.8/site-packages/django/core/management/base.py", line 354, in run_from_argv
self.execute(*args, **cmd_options)
File "/root/.local/share/virtualenvs/backend-uuyuvXgx/lib/python3.8/site-packages/django/core/management/base.py", line 398, in execute
output = self.handle(*args, **options)
File "/root/.local/share/virtualenvs/backend-uuyuvXgx/lib/python3.8/site-packages/django/core/management/base.py", line 89, in wrapped
res = handle_func(*args, **kwargs)
File "/root/.local/share/virtualenvs/backend-uuyuvXgx/lib/python3.8/site-packages/django/core/management/commands/migrate.py", line 244, in handle
post_migrate_state = executor.migrate(
File "/root/.local/share/virtualenvs/backend-uuyuvXgx/lib/python3.8/site-packages/django/db/migrations/executor.py", line 117, in migrate
state = self._migrate_all_forwards(state, plan, full_plan, fake=fake, fake_initial=fake_initial)
File "/root/.local/share/virtualenvs/backend-uuyuvXgx/lib/python3.8/site-packages/django/db/migrations/executor.py", line 147, in _migrate_all_forwards
state = self.apply_migration(state, migration, fake=fake, fake_initial=fake_initial)
File "/root/.local/share/virtualenvs/backend-uuyuvXgx/lib/python3.8/site-packages/django/db/migrations/executor.py", line 230, in apply_migration
migration_recorded = True
File "/root/.local/share/virtualenvs/backend-uuyuvXgx/lib/python3.8/site-packages/django/db/backends/base/schema.py", line 118, in __exit__
self.execute(sql)
File "/root/.local/share/virtualenvs/backend-uuyuvXgx/lib/python3.8/site-packages/django/db/backends/base/schema.py", line 145, in execute
cursor.execute(sql, params)
File "/root/.local/share/virtualenvs/backend-uuyuvXgx/lib/python3.8/site-packages/django/db/backends/utils.py", line 98, in execute
return super().execute(sql, params)
File "/root/.local/share/virtualenvs/backend-uuyuvXgx/lib/python3.8/site-packages/django/db/backends/utils.py", line 66, in execute
return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
File "/root/.local/share/virtualenvs/backend-uuyuvXgx/lib/python3.8/site-packages/django/db/backends/utils.py", line 75, in _execute_with_wrappers
return executor(sql, params, many, context)
File "/root/.local/share/virtualenvs/backend-uuyuvXgx/lib/python3.8/site-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "/root/.local/share/virtualenvs/backend-uuyuvXgx/lib/python3.8/site-packages/django/db/utils.py", line 90, in __exit__
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/root/.local/share/virtualenvs/backend-uuyuvXgx/lib/python3.8/site-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "/root/.local/share/virtualenvs/backend-uuyuvXgx/lib/python3.8/site-packages/django/db/backends/mysql/base.py", line 73, in execute
return self.cursor.execute(query, args)
File "/root/.local/share/virtualenvs/backend-uuyuvXgx/lib/python3.8/site-packages/pymysql/cursors.py", line 158, in execute
result = self._query(query)
File "/root/.local/share/virtualenvs/backend-uuyuvXgx/lib/python3.8/site-packages/pymysql/cursors.py", line 325, in _query
conn.query(q)
File "/root/.local/share/virtualenvs/backend-uuyuvXgx/lib/python3.8/site-packages/pymysql/connections.py", line 549, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
File "/root/.local/share/virtualenvs/backend-uuyuvXgx/lib/python3.8/site-packages/pymysql/connections.py", line 779, in _read_query_result
result.read()
File "/root/.local/share/virtualenvs/backend-uuyuvXgx/lib/python3.8/site-packages/pymysql/connections.py", line 1157, in read
first_packet = self.connection._read_packet()
File "/root/.local/share/virtualenvs/backend-uuyuvXgx/lib/python3.8/site-packages/pymysql/connections.py", line 729, in _read_packet
packet.raise_for_error()
File "/root/.local/share/virtualenvs/backend-uuyuvXgx/lib/python3.8/site-packages/pymysql/protocol.py", line 221, in raise_for_error
err.raise_mysql_exception(self._data)
File "/root/.local/share/virtualenvs/backend-uuyuvXgx/lib/python3.8/site-packages/pymysql/err.py", line 143, in raise_mysql_exception
raise errorclass(errno, errval)
django.db.utils.OperationalError: (1824, "Failed to open the referenced table 'tbl_user'")
大佬,这个项目的开源协议是?能否商用?
缺少sql文件,且用上个项目python-django-online-exam中的sql文件也有点问题。
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.