互联网

关于互联网上七大姑,八大姨的一些九卦。

wordpress外部链接插件Keywords to Links Converter

wordpress外部链接插件Keywords to Links Converter 这个作affiliate的时候特别有用。 比如你有一个推广链接,利用这个插件,设置一个关键词链接到这个推广链接,以后每次写文章的时候,出现这个关键词,它就自动给你加上你的推广链接,不用你每次都输入那么一大长串的推广的推广链接了。 您是否厌倦了在帖子中链接网站? 这个插件可以解决你的问题。 链接您的关键字一次,……

zanhu折腾记录

zanhu折腾记录 一、无法安装rcssmin 使用下面的命令就好了: pip install rcssmin --install-option="--without-c-extensions" 参考:https://www.cnblogs.com/dengyg200891/p/9581671.html 二、其他的 No module named 'channals' 安装production.txt ModuleNotFoundError: No module named 'sorl' pip install s……

采集wikipedia

采集wikipedia 一、方法一 https://en.wikipedia.org/w/api.php?format=json&action=query&prop=extracts&exintro&explaintext&redirects=1&titles=Stack%20Overflow 结果: 代码2 https://en.wikipedia.org/w/api.php?action=query&prop=extracts&format=json&exintro=&titles=Stack%20Overflow 方法二: https://en.wikipe……

什么是Hashtags?

什么是Hashtags? 什么是Hashtags(主题标签)? 主题标签是一个以“#”符号开头的单词或短语。 在社交媒体上,它用作(对于用户和算法)一条内容与特定主题相关或属于某个类别的指示。 主题标签有助于在平台搜索中发现内容,并有效地覆盖更多人。 Twitter 用户 Chris Messina (@chrismessina) 于 2007 年 8 月首次在推特上使用标签符号 #,作……

Python常用代码(四)pythonic

Python常用代码(四)pythonic 一、 value = True if request.Post["value"] == 'U' else False 二、 assertTrue (all( a == b for a, b in zip(response.contex_data['questions'],Question.objects.all()))) 三、查看文件夹下面的所有文件 import os from os.path import isfile,join files = [f for f in os.listdir() if isfile(join(f))] ……

Django中级笔记

Django中级笔记 Django高级实战 开发企业级问答网站 一、反向查询 (一) 设置数据库字段的时候,设置了related_name user= models.ForeignKey(settings.AUTH_USER_MODEL, blank= True, null= True, on_delete.=models.SET_NULL, related_name='publisher',verbose-name = "自关联") 就可以通过这个反向查询 context[commnet"] = user.pu……

Django的GenericRelation

Django的GenericRelation 在django中,如果要实现这样的功能:比如一个评论模块,即可以对文章进行评论,也可以对用户的提问进行评论,这时,就要使用Django的GenericRelation。 一、导入 它的导入在GenericForeignKey后面直接加上GenericRelation即可。 二、定义comment类 content_type、object_id这两个的名字不要修改,因为GenericForeignKey……

Page: 20 of 78 1 ... 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 ... 78