Django框架会自动帮建立表
生成迁移文件:
python manage.py makemigrations
在运行次命令后,报错如下:
Traceback (most recent call last):
File "python3.5/site-packages/django/db/backends/mysql/base.py", line 25, in <module>
import MySQLdb as Database
ImportError: No module named 'MySQLdb'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "manage.py", line 22, in <module>
execute_from_command_line(sys.argv)
File "python3.5/site-packages/django/core/management/__init__.py", line 350, in execute_from_command_line
utility.execute()
File "python3.5/site-packages/django/core/management/__init__.py", line 324, in execute
django.setup()
File "python3.5/site-packages/django/__init__.py", line 18, in setup
apps.populate(settings.INSTALLED_APPS)
File "pyth