04 2019 档案
摘要:from django.contrib import admin # Register your models here. from .models import * from django.utils.safestring import mark_safe class BookConfig(admin.ModelAdmin): def deletes(self): re...
阅读全文
摘要:KindEditor 是一套开源的在线HTML编辑器,主要用于让用户在网站上获得所见即所得编辑效果,开发人员可以用 KindEditor 把传统的多行文本输入框(textarea)替换为可视化的富文本输入框。 KindEditor 使用 JavaScript 编写,可以无缝地与 Java、.NET、
阅读全文
摘要:Beautiful Soup Beautiful Soup 是用Python写的一个HTML/XML的解析器,它可以很好的处理不规范标记并生成剖析树(parse tree)。 它提供简单又常用的导航(navigating),搜索以及修改剖析树的操作。它可以大大节省你的编程时间。 对于Ruby,使用R
阅读全文
摘要:数据库模型 from django.db import models # Create your models here. from django.db import models # Create your models here. class Author(models.Model): nid
阅读全文
摘要:例: 文章点赞
阅读全文
摘要:博客当中侧栏一般都会有分类、标签、日期等,一般博主会根据这些将博客归类,并且点击后,会显示出归类好的文章列表。 需要使用的技术为model中的annotate,相当于mysql中的group by 例: django中的model from django.db import models from
阅读全文