摘要:
from django.conf.urls import urlurlpatterns 的{}改为[],url才能识别正则表达式 阅读全文
摘要:
打开cmd窗口,在命令行输入 “chcp 65001” 。(65001代表编码格式为utf-8) 阅读全文
摘要:
django3 需要mysql版本至少5.6以上,升级mysql版本解决。 django.db.migrations.exceptions.MigrationSchemaMissing: Unable to create the django_migrations table ((1064, "Yo 阅读全文
摘要:
当你在Django中删除了一个有着外键关联的数据时,比如一个作者和他名下的所有的书的信息,书的外键是作者(一个作者可有好多本书),当你把作者的信息从数据库中删除时,Django提供了一下几个参数来对作者的书的数据进行操作外键的定义: book = models.ForeignKey(Author,o 阅读全文