Django学习
「已注销」
这个作者很懒,什么都没留下…
展开
-
Django 【Model】【坑】
1. 问题:TypeError: __init__() missing 1 required positional argument: 'on_delete' classForeignKey(to,on_delete,**options)[source]¶ A many-to-one relationship. Requires two positional arguments: the class to which the model is related and theon_deleteo...翻译 2020-12-02 11:45:12 · 181 阅读 · 0 评论 -
Django 链接MySQL 【坑】
1. -bash: mysql: command not found https://www.jianshu.com/p/ba2216596569 2.django.db.utils.OperationalError: (1049, "Unknown database 'mydatabase'") 报错 mysql> create database mydatabase character set uft8; https://blog.csdn.net/lo_bamboo/articl..转载 2020-11-27 17:50:32 · 168 阅读 · 0 评论 -
PYTHONPATH for import
1.在终端里使用 export PYTHONPATH="文件夹路径" 2. 检查是否设置完成路径 echo $PYTHONPATH翻译 2020-11-27 10:23:38 · 250 阅读 · 0 评论