牛二的梦想 |
|
||
2019年2月16日
摘要:
如何高效查询表的总记录数(通用方法) 很多表都会设计一个步长为1的自增长整型(INT)列作为表主键,该做法优劣这里不展开讨论,仅基于这一"习惯",外加一个假设:该字段连续无为断,则可以使用MAX函数了,限制较多哈 1,自增长列 2,该列连续 阅读全文
2019年2月12日
摘要:
{# 如果 a1 == a2 则显示 #} {% ifequal a1 a2 %} <h1>equal!</h1> {% else %} <h1>not equal!</h1> {% endifequal %} 附:Paginator类的解释,方法,属性 class Paginator(object 阅读全文
摘要:
在VBA中做了一个比较体积,如果体积相似就显示隔壁单元格的内容 Function VC(a, b As Range) 'VolumeCompare体积比较 Dim arry() As Variant Dim i, c, d As Integer Dim kmin As Double Dim kmin 阅读全文
2019年2月11日
摘要:
A well known speaker started off his seminar by holding up a $20 bill.In the room of 200, he asked. "Who would like this $20 bill?"Hands started going 阅读全文
摘要:
今天在学习例子的时候 不注意吧settings.py里面的INSTALL APPS 的APP应用名称写错了 应该是blog 写成了myblog 结果导致python manage.py makemigrations; python manage.py migrate没有反应。 在这个小坑上折腾了半个 阅读全文
2019年2月8日
摘要:
settings.py#设置文件上传路径,图片上传、文件上传都会存放在此目录里MEDIA_URL = '/media/'MEDIA_ROOT = os.path.join(BASE_DIR, 'media') #PEP8:missing whitespace around operator os前后 阅读全文
2019年2月5日
摘要:
class ModelAdmin(BaseModelAdmin): """Encapsulate all admin options and functionality for a given model.""" list_display = ('__str__',)# 列表里显示想要显示的字段 l 阅读全文
|
Copyright © 2024 牛二的梦想
Powered by .NET 8.0 on Kubernetes |