
python学习
凯风自南c
这个作者很懒,什么都没留下…
展开
-
在Django中提示找不到模版报错“ django.template.exceptions.TemplateDoesNotExist: index.html“
在settings.py的TEMPLATES对应的’DIRS’中添加: [os.path.join(BASE_DIR,‘templates’)] TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [os.path.join(BASE_DIR, 'templates')], 'APP_DIRS': True, 'OPT原创 2020-08-03 22:37:24 · 850 阅读 · 1 评论 -
matplotlib中颜色映射的使用
matplotlib3.3中使用颜色映射 问题描述 在Python编程从入门到实践一书中15.2.8节 按照书中代码,在python3.8与matplotlib3.3中,camp=plt.cm.Blues报错 解决 搜索发现应将此处语法改为camp=plt.get_camp(‘Blues’),即可 如要修改颜色映射,修改字符串的值即可 pyplot中所有的颜色映射 链接: https://matplotlib.org/gallery/color/colormap_reference.html#sphx-gl原创 2020-07-30 21:44:50 · 1700 阅读 · 1 评论