![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
关于一些小bug
刘阳光丶
小白一枚,多多指教。
展开
-
数据库数字值排序乱序问题
例如:数据库str型主键(非自增)自动排序,是以字符串类型进行排序,若要按正序123456…进行排序,则需要将字符串类型转换为int型原创 2020-08-06 13:12:34 · 996 阅读 · 0 评论 -
解决%d format: a number is required, not str问题【一试灵】
在python项目中,向数据库插入int型字符,惯用%d,然后出现报错%d format: a number is required, not str。解决办法: 传给sql的变量写对格式就行了,sql里不需要对对应的变量写%d,只写%s就可以了!例如:创建数据库:Id为int型主键。SQL = """CREATE TABLE phone_member (`Id` int (5) NOT NULL,`Name` varchar (8) NOT NULL,`PNumber` varchar (20)原创 2020-08-06 12:55:55 · 13828 阅读 · 0 评论 -
关于django.template.exceptions.TemplateSyntaxError: 'staticfiles' is not a registered tag library.
**关于django.template.exceptions.TemplateSyntaxError: ‘staticfiles’ is not a registered tag library.**当我们在html中使用static模板时,会调用static, {% load static from staticfiles %}或者{% load staticfiles %}。因为版本问题...原创 2020-03-16 21:40:07 · 681 阅读 · 1 评论