Django框架,'DIRS': [BASE_DIR/'templates'], TypeError: unsupported operand type(s) for /: 'str' and 'str'
报错:
'DIRS': [BASE_DIR/'templates'],
TypeError: unsupported operand type(s) for /: 'str' and 'str'
解决:
该问题就是把‘/’识别为除号了,两个str无法进行除号。代码实际意思是将两个str进行拼接,进入settings.py进行如下修改:
版权声明:1974419863@qq.com 发表于 2022年5月7日 下午8:43。
转载请注明:Django框架,'DIRS': [BASE_DIR/'templates'], TypeError: unsupported operand type(s) for /: 'str' and 'str' | 仙女次元
转载请注明:Django框架,'DIRS': [BASE_DIR/'templates'], TypeError: unsupported operand type(s) for /: 'str' and 'str' | 仙女次元
相关文章
暂无评论...