02 2021 档案
摘要:models.py # 创建产品表 class Product(models.Model): productName = models.CharField('产品名称', max_length=64) # 产品名称 productDesc = models.CharField('产品描述', max
阅读全文
摘要:执行命令 python manage.py makemigrations时抛出以下错误 Traceback (most recent call last): File "D:\Program Files\Python\Python37-32\lib\site-packages\django\db\b
阅读全文
摘要:举个例子: 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
阅读全文
摘要:执行python manage.py makemigrations时出现以下错误 D:\autotestplat>python manage.py makemigrations Traceback (most recent call last): File "manage.py", line 21,
阅读全文
摘要:在python中,字符串是最常用的数据类型,通常由单引号(' ')、双引号(" ")、三重引号(''' ''',""" """)引起来。 # 字符串的创建 str1 = "hello world" str2 = 'sunlight' str3 = '''On a new day, the sun r
阅读全文