02 2021 档案

摘要:models.py # 创建产品表 class Product(models.Model): productName = models.CharField('产品名称', max_length=64) # 产品名称 productDesc = models.CharField('产品描述', max 阅读全文
posted @ 2021-02-23 19:40 **绵绵羊** 阅读(485) 评论(0) 推荐(1) 编辑
摘要:执行命令 python manage.py makemigrations时抛出以下错误 Traceback (most recent call last): File "D:\Program Files\Python\Python37-32\lib\site-packages\django\db\b 阅读全文
posted @ 2021-02-23 19:33 **绵绵羊** 阅读(1343) 评论(0) 推荐(0) 编辑
摘要:举个例子: str1 = 'sunlightn' f = str1.rfind("n", __start=1, __end=2) print(f) 以上代码运行后出现: "D:\Program Files\Python\Python37-32\python.exe" D:/demo/str_1.py 阅读全文
posted @ 2021-02-23 19:19 **绵绵羊** 阅读(12687) 评论(0) 推荐(0) 编辑
摘要:执行python manage.py makemigrations时出现以下错误 D:\autotestplat>python manage.py makemigrations Traceback (most recent call last): File "manage.py", line 21, 阅读全文
posted @ 2021-02-23 18:30 **绵绵羊** 阅读(2397) 评论(0) 推荐(0) 编辑
摘要:在python中,字符串是最常用的数据类型,通常由单引号(' ')、双引号(" ")、三重引号(''' ''',""" """)引起来。 # 字符串的创建 str1 = "hello world" str2 = 'sunlight' str3 = '''On a new day, the sun r 阅读全文
posted @ 2021-02-23 18:25 **绵绵羊** 阅读(241) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示