摘要:
1、将阅读量的代码封装在一个app中,增加扩展性 新建app: 2、变化的部分 3、上代码 from django.contrib import admin from .models import BlogType, Blog # Register your models here. @admin. 阅读全文
摘要:
1、变化的部分 2、上代码 {# 引用模板 #} {% extends 'base.html' %} {% load staticfiles %} {% block header_extends %} <link rel="stylesheet" href="{% static 'blog/blog 阅读全文
摘要:
1、变化的部分 2、上代码 ul.blog-types,ul.blog-dates { list-style-type: none; } div.blog:not(:last-child) { margin-bottom: 2em; padding-bottom: 1em; border-botto 阅读全文
摘要:
使用django默认的编辑器感觉功能太少了,所以集成一下富文本编辑器。 1、安装和使用 (1)、安装 (2)、注册应用 在django的settings中添加‘ckeditor’的app (3)、配置models 将需要用到富文本编辑器的字段改成RichTextField 上面三步配置过后是不能上传 阅读全文
摘要:
1、命令格式: more [-dlfpcsu ] [-num ] [+/ pattern] [+ linenum] [file] 2、命令功能: more命令和cat的功能一样都是查看文件里的内容,但有所不同的是more可以按页来查看文件的内容,还支持直接跳转行等功能。 3、命令参数: 4、常用操作 阅读全文