摘要:
1、命令格式: which 可执行文件名称 2、命令功能: which指令会在PATH变量指定的路径中,搜索某个系统命令的位置,并且返回第一个搜索结果。 3、命令参数: 4、简单实例: (1)、查找文件并显示命令路径 命令: which python3 输出:(which是查找PATH路径下配置的文 阅读全文
摘要:
使用自定义模板标签实现了评论计数,获取评论列表等功能 1、变化的部分 2、上代码 ul.blog-types,ul.blog-dates { list-style-type: none; } div.blog:not(:last-child) { margin-bottom: 2em; paddin 阅读全文
摘要:
接上一篇添加评论功能之后,增加回复的功能。 1、变化的部分 2、上代码 ul.blog-types,ul.blog-dates { list-style-type: none; } div.blog:not(:last-child) { margin-bottom: 2em; padding-bot 阅读全文
摘要:
1、命令格式: tail[必要参数][选择参数][文件] 2、命令功能: 用于显示指定文件末尾内容,不指定文件时,作为输入信息进行处理。常用查看日志文件。 3、命令参数: 4、常用实例 (1)、显示文件尾部内容 命令: tail -n 5 a.txt 输出: (2)、循环查看文件内容 命令: tai 阅读全文
摘要:
编辑功能使用到了ckeditor的MathJax组件。ajax提交评论可以不用刷新浏览器。 1、变化的部分 2、上代码: ul.blog-types,ul.blog-dates { list-style-type: none; } div.blog:not(:last-child) { margin 阅读全文
摘要:
1、变化的部分 2、上代码: {# 引用模板 #} {% extends 'base.html' %} {% load staticfiles %} {% block header_extends %} <link rel="stylesheet" href="{% static 'blog/blo 阅读全文
摘要:
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 阅读全文
摘要:
1、命令格式: head [参数] [文件] 2、命令功能: head 用来显示档案的开头至标准输出中,默认head命令打印其相应文件的开头10行。 3、命令参数: 4、简单实例: (1)、显示文件前n行 命令: head -n 5 a.txt 输出: (2)、显示文件前n个字节 命令: head 阅读全文
摘要:
因为评论可以作为一个模块,所以单独创建一个app,专门用来处理评论。 1、变化的部分 2、上代码 {# 引用模板 #} {% extends 'base.html' %} {% load staticfiles %} {% block header_extends %} <link rel="sty 阅读全文
摘要:
1、变化的部分 2、上代码: from django.db import models from django.contrib.auth.models import User from django.contrib.contenttypes.fields import GenericRelation 阅读全文