Compare commits
78 Commits
@ -0,0 +1,26 @@
|
||||
# 项目开发报告
|
||||
|
||||
## 项目概述
|
||||
本项目是一个软件工程方法论实践项目。
|
||||
|
||||
## 登录功能开发进度
|
||||
|
||||
### 已完成
|
||||
- [x] 项目环境搭建
|
||||
- [x] Git分支管理配置
|
||||
- [x] 基础文档结构创建
|
||||
|
||||
### 进行中
|
||||
- [ ] 用户登录功能实现
|
||||
- [ ] 密码加密模块
|
||||
- [ ] 会话管理功能
|
||||
|
||||
### 技术栈
|
||||
- Python 3.x
|
||||
- Git 版本控制
|
||||
- Markdown 文档
|
||||
|
||||
## 下一步计划
|
||||
1. 实现登录功能代码
|
||||
2. 编写单元测试
|
||||
3. 完成集成测试
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,10 +1,9 @@
|
||||
[run]
|
||||
source = .
|
||||
include = *.py
|
||||
omit =
|
||||
*migrations*
|
||||
*tests*
|
||||
*.html
|
||||
*whoosh_cn_backend*
|
||||
*settings.py*
|
||||
*venv*
|
||||
source = . # 分析当前目录下的代码
|
||||
include = *.py # 包含所有 .py 文件
|
||||
omit = # 排除以下文件/目录
|
||||
*migrations* # 数据库迁移文件
|
||||
*tests* # 测试文件
|
||||
*.html # HTML 文件
|
||||
*whoosh_cn_backend* # Whoosh 中文后端
|
||||
*settings.py* # 设置文件
|
||||
*venv* # 虚拟环境
|
||||
@ -1,11 +1,20 @@
|
||||
bin/data/
|
||||
# virtualenv
|
||||
venv/
|
||||
collectedstatic/
|
||||
djangoblog/whoosh_index/
|
||||
uploads/
|
||||
settings_production.py
|
||||
*.md
|
||||
docs/
|
||||
logs/
|
||||
static/
|
||||
[run]
|
||||
source = .
|
||||
include = *.py
|
||||
omit =
|
||||
*migrations*
|
||||
*tests*
|
||||
*.html
|
||||
*whoosh_cn_backend*
|
||||
*settings.py*
|
||||
*venv*
|
||||
bin/data/ # 二进制数据目录
|
||||
venv/ # 虚拟环境目录
|
||||
collectedstatic/ # 收集的静态文件目录
|
||||
djangoblog/whoosh_index/ # Whoosh搜索索引目录
|
||||
uploads/ # 文件上传目录
|
||||
settings_production.py # 生产环境配置文件
|
||||
*.md # Markdown文档文件
|
||||
docs/ # 文档目录
|
||||
logs/ # 日志文件目录
|
||||
static/ # 静态文件目录
|
||||
@ -1,6 +1,6 @@
|
||||
blog/static/* linguist-vendored
|
||||
*.js linguist-vendored
|
||||
*.css linguist-vendored
|
||||
* text=auto
|
||||
*.sh text eol=lf
|
||||
*.conf text eol=lf
|
||||
blog/static/* linguist-vendored # 静态文件标记为vendored
|
||||
*.js linguist-vendored # JS文件标记为vendored
|
||||
*.css linguist-vendored # CSS文件标记为vendored
|
||||
* text=auto # 自动检测文本文件
|
||||
*.sh text eol=lf # Shell脚本使用LF换行
|
||||
*.conf text eol=lf # 配置文件使用LF换行
|
||||
@ -1,80 +1,80 @@
|
||||
# Byte-compiled / optimized / DLL files
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
*$py.class
|
||||
__pycache__/ # Python缓存文件
|
||||
*.py[cod] # Python编译文件
|
||||
*$py.class # Python类文件
|
||||
|
||||
# C extensions
|
||||
*.so
|
||||
*.so # C扩展文件
|
||||
|
||||
# Distribution / packaging
|
||||
.Python
|
||||
env/
|
||||
build/
|
||||
develop-eggs/
|
||||
dist/
|
||||
downloads/
|
||||
eggs/
|
||||
.eggs/
|
||||
lib/
|
||||
lib64/
|
||||
parts/
|
||||
sdist/
|
||||
var/
|
||||
*.egg-info/
|
||||
.installed.cfg
|
||||
*.egg
|
||||
.Python # Python相关文件
|
||||
env/ # 环境目录
|
||||
build/ # 构建目录
|
||||
develop-eggs/ # 开发egg包
|
||||
dist/ # 分发目录
|
||||
downloads/ # 下载目录
|
||||
eggs/ # Egg包目录
|
||||
.eggs/ # Egg包目录
|
||||
lib/ # 库目录
|
||||
lib64/ # 64位库目录
|
||||
parts/ # 部件目录
|
||||
sdist/ # 源码分发目录
|
||||
var/ # 变量目录
|
||||
*.egg-info/ # Egg信息目录
|
||||
.installed.cfg # 安装配置
|
||||
*.egg # Egg文件
|
||||
|
||||
# PyInstaller
|
||||
# Usually these files are written by a python script from a template
|
||||
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
||||
*.manifest
|
||||
*.spec
|
||||
*.manifest # 清单文件
|
||||
*.spec # 规范文件
|
||||
|
||||
# Installer logs
|
||||
pip-log.txt
|
||||
pip-delete-this-directory.txt
|
||||
pip-log.txt # Pip日志
|
||||
pip-delete-this-directory.txt # Pip删除目录标记
|
||||
|
||||
# Unit test / coverage reports
|
||||
htmlcov/
|
||||
.tox/
|
||||
.coverage
|
||||
.coverage.*
|
||||
.cache
|
||||
nosetests.xml
|
||||
coverage.xml
|
||||
*,cover
|
||||
htmlcov/ # HTML覆盖率报告
|
||||
.tox/ # Tox测试目录
|
||||
.coverage # 覆盖率数据
|
||||
.coverage.* # 覆盖率数据文件
|
||||
.cache # 缓存目录
|
||||
nosetests.xml # Nose测试报告
|
||||
coverage.xml # 覆盖率XML报告
|
||||
*,cover # 覆盖率文件
|
||||
|
||||
# Translations
|
||||
*.pot
|
||||
*.pot # 翻译模板文件
|
||||
|
||||
# Django stuff:
|
||||
*.log
|
||||
logs/
|
||||
*.log # 日志文件
|
||||
logs/ # 日志目录
|
||||
|
||||
# Sphinx documentation
|
||||
docs/_build/
|
||||
docs/_build/ # Sphinx构建目录
|
||||
|
||||
# PyBuilder
|
||||
target/
|
||||
|
||||
target/ # 目标目录
|
||||
|
||||
# PyCharm
|
||||
# http://www.jetbrains.com/pycharm/webhelp/project.html
|
||||
.idea
|
||||
.iml
|
||||
static/
|
||||
.idea # PyCharm IDE配置
|
||||
.iml # IntelliJ模块文件
|
||||
static/ # 静态文件目录
|
||||
|
||||
# virtualenv
|
||||
venv/
|
||||
venv/ # 虚拟环境目录
|
||||
|
||||
collectedstatic/
|
||||
djangoblog/whoosh_index/
|
||||
google93fd32dbd906620a.html
|
||||
baidu_verify_FlHL7cUyC9.html
|
||||
BingSiteAuth.xml
|
||||
cb9339dbe2ff86a5aa169d28dba5f615.txt
|
||||
werobot_session.*
|
||||
django.jpg
|
||||
uploads/
|
||||
settings_production.py
|
||||
werobot_session.db
|
||||
bin/datas/
|
||||
collectedstatic/ # 收集的静态文件目录
|
||||
djangoblog/whoosh_index/ # Whoosh搜索索引目录
|
||||
google93fd32dbd906620a.html # Google验证文件
|
||||
baidu_verify_FlHL7cUyC9.html # 百度验证文件
|
||||
BingSiteAuth.xml # Bing站点认证文件
|
||||
cb9339dbe2ff86a5aa169d28dba5f615.txt # 验证文本文件
|
||||
werobot_session.* # WeRobot会话文件
|
||||
django.jpg # Django图片文件
|
||||
uploads/ # 文件上传目录
|
||||
settings_production.py # 生产环境配置文件
|
||||
werobot_session.db # WeRobot会话数据库
|
||||
bin/datas/ # 二进制数据目录
|
||||
@ -1,15 +1,15 @@
|
||||
FROM python:3.11
|
||||
ENV PYTHONUNBUFFERED 1
|
||||
WORKDIR /code/djangoblog/
|
||||
RUN apt-get update && \
|
||||
apt-get install default-libmysqlclient-dev gettext -y && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
ADD requirements.txt requirements.txt
|
||||
RUN pip install --upgrade pip && \
|
||||
pip install --no-cache-dir -r requirements.txt && \
|
||||
pip install --no-cache-dir gunicorn[gevent] && \
|
||||
pip cache purge
|
||||
ENV PYTHONUNBUFFERED 1 # 设置Python无缓冲模式
|
||||
WORKDIR /code/djangoblog/ # 设置工作目录
|
||||
RUN apt-get update && \\
|
||||
apt-get install default-libmysqlclient-dev gettext -y && \\ # 安装MySQL客户端和gettext
|
||||
rm -rf /var/lib/apt/lists/* # 清理APT缓存
|
||||
ADD requirements.txt requirements.txt # 添加依赖文件
|
||||
RUN pip install --upgrade pip && \\
|
||||
pip install --no-cache-dir -r requirements.txt && \\ # 安装Python依赖
|
||||
pip install --no-cache-dir gunicorn[gevent] && \\ # 安装Gunicorn服务器
|
||||
pip cache purge # 清理pip缓存
|
||||
|
||||
ADD . .
|
||||
RUN chmod +x /code/djangoblog/deploy/entrypoint.sh
|
||||
ENTRYPOINT ["/code/djangoblog/deploy/entrypoint.sh"]
|
||||
ADD . . # 添加项目代码
|
||||
RUN chmod +x /code/djangoblog/deploy/entrypoint.sh # 给入口脚本添加执行权限
|
||||
ENTRYPOINT ["/code/djangoblog/deploy/entrypoint.sh"] # 设置入口点脚本
|
||||
@ -1,20 +1,22 @@
|
||||
The MIT License (MIT)
|
||||
```
|
||||
The MIT License (MIT) # MIT许可证
|
||||
|
||||
Copyright (c) 2025 车亮亮
|
||||
Copyright (c) 2025 车亮亮 # 版权所有2025 车亮亮
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
subject to the following conditions: # 允许任何人免费使用、复制、修改、合并、发布、分发、再许可和/或销售软件的副本
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
copies or substantial portions of the Software. # 上述版权声明和许可声明必须包含在所有副本或实质性部分中
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # 软件按原样提供,不承担任何明示或暗示的担保责任
|
||||
```
|
||||
Binary file not shown.
@ -1,59 +1,51 @@
|
||||
{% load i18n %}
|
||||
{% load blog_tags %}
|
||||
|
||||
|
||||
<footer class="entry-meta">
|
||||
{% trans 'posted in' %}
|
||||
{% trans 'posted in' %} {# 分类信息 #}
|
||||
<a href="{{ article.category.get_absolute_url }}" rel="category tag">{{ article.category.name }}</a>
|
||||
|
||||
|
||||
</a>
|
||||
{% if article.type == 'a' %}
|
||||
{% if article.tags.all %}
|
||||
|
||||
{% trans 'and tagged' %}
|
||||
{% for t in article.tags.all %}
|
||||
<a href="{{ t.get_absolute_url }}" rel="tag">{{ t.name }}</a>
|
||||
{% if t != article.tags.all.last %}
|
||||
{% if article.type == 'a' %} {# 仅文章类型显示标签 #}
|
||||
{% if article.tags.all %} {# 如果有标签 #}
|
||||
{% trans 'and tagged' %} {# 标签信息 #}
|
||||
{% for t in article.tags.all %} {# 遍历所有标签 #}
|
||||
<a href="{{ t.get_absolute_url }}" rel="tag">{{ t.name }}</a> {# 单个标签链接 #}
|
||||
{% if t != article.tags.all.last %} {# 非最后一个标签加逗号 #}
|
||||
,
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
.{% trans 'by ' %}
|
||||
|
||||
.{% trans 'by ' %} {# 作者信息 #}
|
||||
<span class="by-author">
|
||||
<span class="author vcard">
|
||||
<a class="url fn n" href="{{ article.author.get_absolute_url }}"
|
||||
{% blocktranslate %}
|
||||
title="View all articles published by {{ article.author.username }}"
|
||||
title="View all articles published by {{ article.author.username }}" {# 作者页面提示 #}
|
||||
{% endblocktranslate %}
|
||||
rel="author">
|
||||
<span itemprop="author" itemscope itemtype="http://schema.org/Person">
|
||||
|
||||
<span itemprop="name" itemprop="publisher">
|
||||
|
||||
{{ article.author.username }}
|
||||
</span>
|
||||
<span itemprop="author" itemscope itemtype="http://schema.org/Person"> {# 结构化数据 #}
|
||||
<span itemprop="name" itemprop="publisher">
|
||||
{{ article.author.username }} {# 作者用户名 #}
|
||||
</span>
|
||||
</span>
|
||||
</a>
|
||||
|
||||
|
||||
</a>
|
||||
</span>
|
||||
{% trans 'on' %}
|
||||
<a href="{{ article.get_absolute_url }}"
|
||||
title="{% datetimeformat article.pub_time %}"
|
||||
itemprop="datePublished" content="{% datetimeformat article.pub_time %}"
|
||||
rel="bookmark">
|
||||
|
||||
<time class="entry-date updated"
|
||||
datetime="{{ article.pub_time }}">
|
||||
{% datetimeformat article.pub_time %}</time>
|
||||
{% if user.is_superuser %}
|
||||
<a href="{{ article.get_admin_url }}">{% trans 'edit' %}</a>
|
||||
{% endif %}
|
||||
|
||||
{% trans 'on' %} {# 发布时间 #}
|
||||
<a href="{{ article.get_absolute_url }}"
|
||||
title="{% datetimeformat article.pub_time %}" {# 发布时间提示 #}
|
||||
itemprop="datePublished" content="{% datetimeformat article.pub_time %}"
|
||||
rel="bookmark">
|
||||
<time class="entry-date updated"
|
||||
datetime="{{ article.pub_time }}"> {# 时间语义化标签 #}
|
||||
{% datetimeformat article.pub_time %} {# 格式化显示时间 #}
|
||||
</time>
|
||||
</a>
|
||||
|
||||
{% if user.is_superuser %} {# 管理员显示编辑链接 #}
|
||||
<a href="{{ article.get_admin_url }}">{% trans 'edit' %}</a> {# 编辑文章链接 #}
|
||||
{% endif %}
|
||||
</span>
|
||||
</footer><!-- .entry-meta -->
|
||||
|
||||
|
||||
</footer><!-- .entry-meta -->
|
||||
@ -1,17 +1,21 @@
|
||||
{% load i18n %}
|
||||
<nav id="nav-below" class="navigation" role="navigation">
|
||||
<h3 class="assistive-text">
|
||||
{% trans 'article navigation' %}
|
||||
{% trans 'article navigation' %} {# 屏幕阅读器使用的导航标题 #}
|
||||
</h3>
|
||||
{% if page_obj.has_next and next_url%}
|
||||
<div class="nav-previous"><a
|
||||
href="{{ next_url }}"><span
|
||||
class="meta-nav">←</span> {% trans 'earlier articles' %}</a></div>
|
||||
{% if page_obj.has_next and next_url %} {# 检查是否有更早的文章 #}
|
||||
<div class="nav-previous">
|
||||
<a href="{{ next_url }}"> {# 上一页链接 #}
|
||||
<span class="meta-nav">←</span> {% trans 'earlier articles' %} {# 向左箭头和文字 #}
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if page_obj.has_previous and previous_url %}
|
||||
<div class="nav-next"><a href="{{ previous_url }}">{% trans 'newer articles' %}
|
||||
<span
|
||||
class="meta-nav">→</span></a>
|
||||
{% if page_obj.has_previous and previous_url %} {# 检查是否有更新的文章 #}
|
||||
<div class="nav-next">
|
||||
<a href="{{ previous_url }}"> {# 下一页链接 #}
|
||||
{% trans 'newer articles' %} {# 更新的文章文字 #}
|
||||
<span class="meta-nav">→</span> {# 向右箭头 #}
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</nav><!-- .navigation -->
|
||||
@ -1,19 +1,17 @@
|
||||
{% load i18n %}
|
||||
{% if article_tags_list %}
|
||||
<div class="panel panel-default">
|
||||
{% if article_tags_list %} {# 检查是否存在标签列表 #}
|
||||
<div class="panel panel-default"> {# Bootstrap面板容器 #}
|
||||
<div class="panel-heading">
|
||||
{% trans 'tags' %}
|
||||
{% trans 'tags' %} {# 面板标题:标签 #}
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
|
||||
{% for url,count,tag,color in article_tags_list %}
|
||||
{% for url,count,tag,color in article_tags_list %} {# 遍历标签数据 #}
|
||||
<a class="label label-{{ color }}" style="display: inline-block;" href="{{ url }}"
|
||||
title="{{ tag.name }}">
|
||||
{{ tag.name }}
|
||||
<span class="badge">{{ count }}</span>
|
||||
title="{{ tag.name }}"> {# 标签链接,显示颜色和提示文字 #}
|
||||
{{ tag.name }} {# 标签名称 #}
|
||||
<span class="badge">{{ count }}</span> {# 标签对应的文章数量 #}
|
||||
</a>
|
||||
{% endfor %}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
@ -1,22 +1,22 @@
|
||||
{% extends 'share_layout/base.html' %}
|
||||
{% block header %}
|
||||
<title> {{ title }}</title>
|
||||
{% extends 'share_layout/base.html' %} {# 继承基础布局模板 #}
|
||||
{% block header %} {# 头部内容块 #}
|
||||
<title> {{ title }}</title> {# 动态页面标题 #}
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<div id="primary" class="site-content">
|
||||
<div id="content" role="main">
|
||||
{% block content %} {# 主要内容块 #}
|
||||
<div id="primary" class="site-content"> {# 主要内容区域 #}
|
||||
<div id="content" role="main"> {# 内容区域 #}
|
||||
|
||||
<header class="archive-header">
|
||||
<header class="archive-header"> {# 归档页眉 #}
|
||||
|
||||
<h2 class="archive-title"> {{ content }}</h2>
|
||||
<h2 class="archive-title"> {{ content }}</h2> {# 动态显示内容 #}
|
||||
</header><!-- .archive-header -->
|
||||
<br/>
|
||||
<header class="archive-header" style="text-align: center">
|
||||
<header class="archive-header" style="text-align: center"> {# 居中对齐的归档页眉 #}
|
||||
|
||||
<a href="{% url "account:login" %}">登录</a>
|
||||
<a href="{% url "account:login" %}">登录</a> {# 登录页面链接 #}
|
||||
|
|
||||
<a href="/">回到首页</a>
|
||||
<a href="/">回到首页</a> {# 首页链接 #}
|
||||
</header><!-- .archive-header -->
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
{% load i18n %}
|
||||
<div class="widget-login">
|
||||
{% if apps %}
|
||||
{% load i18n %} {# 加载国际化标签 #}
|
||||
<div class="widget-login"> {# 登录小部件容器 #}
|
||||
{% if apps %} {# 如果存在OAuth应用 #}
|
||||
<small>
|
||||
{% trans 'quick login' %}:
|
||||
{% trans 'quick login' %}: {# 快速登录提示文字 #}
|
||||
</small>
|
||||
{% for icon,url in apps %}
|
||||
<a href="{{ url }}" rel="nofollow">
|
||||
<span class="icon-sn-{{ icon }}"></span>
|
||||
{% for icon,url in apps %} {# 遍历OAuth应用 #}
|
||||
<a href="{{ url }}" rel="nofollow"> {# OAuth登录链接 #}
|
||||
<span class="icon-sn-{{ icon }}"></span> {# 社交网络图标 #}
|
||||
</a>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
@ -1,3 +1,3 @@
|
||||
{{ object.title }}
|
||||
{{ object.author.username }}
|
||||
{{ object.body }}
|
||||
{{ object.title }} {# 显示对象标题 #}
|
||||
{{ object.author.username }} {# 显示作者用户名 #}
|
||||
{{ object.body }} {# 显示对象内容 #}
|
||||
@ -1,6 +1,6 @@
|
||||
<aside id="text-2" class="widget widget_text"><h3 class="widget-title">Google AdSense</h3>
|
||||
<aside id="text-2" class="widget widget_text"><h3 class="widget-title">Google AdSense</h3> {# Google广告侧边栏部件 #}
|
||||
<div class="textwidget">
|
||||
|
||||
{{ GOOGLE_ADSENSE_CODES }}
|
||||
{{ GOOGLE_ADSENSE_CODES }} {# Google AdSense广告代码变量 #}
|
||||
</div>
|
||||
</aside>
|
||||
</aside>
|
||||
|
||||
@ -1,47 +1,47 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
{% load static %}
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
<link rel="icon" href="../../favicon.ico">
|
||||
<meta name="robots" content="noindex">
|
||||
<title>{{ SITE_NAME }} | {{ SITE_DESCRIPTION }}</title>
|
||||
<link href="{% static 'account/css/account.css' %}" rel="stylesheet">
|
||||
{% load compress %}
|
||||
{% compress css %}
|
||||
<!-- Bootstrap core CSS -->
|
||||
{% load static %} {# 加载静态文件标签 #}
|
||||
<meta charset="utf-8"> {# 字符编码 #}
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> {# IE浏览器兼容模式 #}
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"> {# 响应式视口设置 #}
|
||||
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags --> {# 必须放在头部的三个meta标签 #}
|
||||
<meta name="description" content=""> {# 页面描述 #}
|
||||
<meta name="author" content=""> {# 页面作者 #}
|
||||
<link rel="icon" href="../../favicon.ico"> {# 网站图标 #}
|
||||
<meta name="robots" content="noindex"> {# 禁止搜索引擎索引 #}
|
||||
<title>{{ SITE_NAME }} | {{ SITE_DESCRIPTION }}</title> {# 页面标题 #}
|
||||
<link href="{% static 'account/css/account.css' %}" rel="stylesheet"> {# 账户页面样式表 #}
|
||||
{% load compress %} {# 加载压缩标签 #}
|
||||
{% compress css %} {# CSS压缩块 #}
|
||||
<!-- Bootstrap core CSS --> {# Bootstrap核心样式 #}
|
||||
<link href="{% static 'assets/css/bootstrap.min.css' %}" rel="stylesheet">
|
||||
<link href="{% static 'blog/css/oauth_style.css' %}" rel="stylesheet">
|
||||
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
|
||||
<link href="{% static 'blog/css/oauth_style.css' %}" rel="stylesheet"> {# OAuth样式表 #}
|
||||
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug --> {# IE10视口修复 #}
|
||||
<link href="{% static 'assets/css/ie10-viewport-bug-workaround.css' %}" rel="stylesheet">
|
||||
<!-- TODC Bootstrap core CSS -->
|
||||
<!-- TODC Bootstrap core CSS --> {# TODC Bootstrap样式 #}
|
||||
<link href="{% static 'assets/css/todc-bootstrap.min.css' %}" rel="stylesheet">
|
||||
<!-- Custom styles for this template -->
|
||||
<!-- Custom styles for this template --> {# 自定义样式 #}
|
||||
<link href="{% static 'assets/css/signin.css' %}" rel="stylesheet">
|
||||
{% endcompress %}
|
||||
{% compress js %}
|
||||
<script src="{% static 'assets/js/ie10-viewport-bug-workaround.js' %}"></script>
|
||||
<script src="{% static 'assets/js/ie-emulation-modes-warning.js' %}"></script>
|
||||
{% compress js %} {# JavaScript压缩块 #}
|
||||
<script src="{% static 'assets/js/ie10-viewport-bug-workaround.js' %}"></script> {# IE10视口修复脚本 #}
|
||||
<script src="{% static 'assets/js/ie-emulation-modes-warning.js' %}"></script> {# IE模拟模式警告脚本 #}
|
||||
{% endcompress %}
|
||||
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries --> {# HTML5兼容性支持 #}
|
||||
<!--[if lt IE 9]> {# IE9以下浏览器条件注释 #}
|
||||
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script> {# HTML5标签支持 #}
|
||||
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> {# 媒体查询支持 #}
|
||||
<![endif]-->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
{% block content %}
|
||||
{% block content %} {# 主要内容块 #}
|
||||
{% endblock %}
|
||||
|
||||
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
|
||||
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug --> {# IE10视口修复注释 #}
|
||||
|
||||
</body>
|
||||
<script type="text/javascript" src="{% static 'blog/js/jquery-3.6.0.min.js' %}"></script>
|
||||
<script src="{% static 'account/js/account.js' %}" type="text/javascript"></script>
|
||||
<script type="text/javascript" src="{% static 'blog/js/jquery-3.6.0.min.js' %}"></script> {# jQuery库 #}
|
||||
<script src="{% static 'account/js/account.js' %}" type="text/javascript"></script> {# 账户页面脚本 #}
|
||||
</html>
|
||||
@ -1,56 +1,54 @@
|
||||
<footer id="colophon" role="contentinfo">
|
||||
<div class="site-info" style="text-align: center">
|
||||
Copyright© {{ CURRENT_YEAR }}
|
||||
<a href="/" target="blank">{{ SITE_NAME }}</a>
|
||||
<footer id="colophon" role="contentinfo"> {# 页脚区域 #}
|
||||
<div class="site-info" style="text-align: center"> {# 网站信息,居中对齐 #}
|
||||
Copyright© {{ CURRENT_YEAR }} {# 版权信息和当前年份 #}
|
||||
<a href="/" target="blank">{{ SITE_NAME }}</a> {# 网站首页链接 #}
|
||||
|
|
||||
|
||||
<a href="/sitemap.xml" title="SiteMap" target="_blank">
|
||||
<a href="/sitemap.xml" title="SiteMap" target="_blank"> {# 网站地图链接 #}
|
||||
SiteMap
|
||||
</a>
|
||||
|
|
||||
<a href="/feed" title="RSS Feed" target="_blank">
|
||||
<a href="/feed" title="RSS Feed" target="_blank"> {# RSS订阅链接 #}
|
||||
RSS Feed
|
||||
</a>
|
||||
|
|
||||
<a href="/links.html" title="友情链接" rel="nofollow" target="_blank">
|
||||
<a href="/links.html" title="友情链接" rel="nofollow" target="_blank"> {# 友情链接页面 #}
|
||||
友情链接
|
||||
</a>
|
||||
| Hosting On
|
||||
<a href="https://www.linode.com/?r=b0d38794d05ef8816b357a929106e89b7c6452f9" target="blank" rel="nofollow">Linode</a>
|
||||
| Hosting On {# 托管服务商信息 #}
|
||||
<a href="https://www.linode.com/?r=b0d38794d05ef8816b357a929106e89b7c6452f9" target="blank" rel="nofollow">Linode</a> {# Linode托管链接 #}
|
||||
|
||||
|
|
||||
<a href="https://tongji.baidu.com/sc-web/3478620/home/ico?siteId=11261596" target="_blank"
|
||||
rel="nofollow">百度统计</a>
|
||||
rel="nofollow">百度统计</a> {# 百度统计链接 #}
|
||||
|
||||
</div>
|
||||
<div class="site-info" style="text-align: center">
|
||||
Powered by
|
||||
<a href="https://www.djangoproject.com/" rel="nofollow" target="blank">Django</a>
|
||||
<div class="site-info" style="text-align: center"> {# 技术支持信息 #}
|
||||
Powered by {# 技术支持 #}
|
||||
<a href="https://www.djangoproject.com/" rel="nofollow" target="blank">Django</a> {# Django框架链接 #}
|
||||
|
|
||||
<a href="https://github.com/liangliangyy/DjangoBlog" rel="nofollow" target="blank">liangliangyy</a>
|
||||
<a href="https://github.com/liangliangyy/DjangoBlog" rel="nofollow" target="blank">liangliangyy</a> {# 项目GitHub链接 #}
|
||||
|
|
||||
<a href="https://www.lylinux.net" target="blank">lylinux</a>
|
||||
<a href="https://www.lylinux.net" target="blank">lylinux</a> {# 作者网站链接 #}
|
||||
|
|
||||
本页面加载耗时:<!!LOAD_TIMES!!>s
|
||||
本页面加载耗时:<!!LOAD_TIMES!!>s {# 页面加载时间占位符 #}
|
||||
</div>
|
||||
{% if BEIAN_CODE %}
|
||||
<div class="site-info" style="text-align: center">
|
||||
<a href="https://beian.miit.gov.cn/" rel="nofollow" target="_blank">
|
||||
{% if BEIAN_CODE %} {# 如果存在备案号 #}
|
||||
<div class="site-info" style="text-align: center"> {# 备案信息 #}
|
||||
<a href="https://beian.miit.gov.cn/" rel="nofollow" target="_blank"> {# 工信部备案查询链接 #}
|
||||
<p style=" height:20px;line-height:20px;margin: 0px 0px 0px 5px; color:#939393;">
|
||||
{{ BEIAN_CODE }}
|
||||
{{ BEIAN_CODE }} {# 备案号显示 #}
|
||||
</p>
|
||||
</a>
|
||||
{% if BEIAN_CODE_GONGAN and SHOW_GONGAN_CODE %}
|
||||
{{ BEIAN_CODE_GONGAN |safe }}
|
||||
{% if BEIAN_CODE_GONGAN and SHOW_GONGAN_CODE %} {# 如果存在公安备案号且允许显示 #}
|
||||
{{ BEIAN_CODE_GONGAN | safe }} {# 安全渲染公安备案代码 #}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if ANALYTICS_CODE %}
|
||||
{{ ANALYTICS_CODE| safe }}
|
||||
{% if ANALYTICS_CODE %} {# 如果存在统计代码 #}
|
||||
{{ ANALYTICS_CODE|safe }} {# 安全渲染统计代码 #}
|
||||
{% endif %}
|
||||
{% if GLOBAL_FOOTER %}
|
||||
{{ GLOBAL_FOOTER|safe }}
|
||||
{% if GLOBAL_FOOTER %} {# 如果存在全局页脚代码 #}
|
||||
{{ GLOBAL_FOOTER|safe }} {# 安全渲染全局页脚代码 #}
|
||||
{% endif %}
|
||||
</footer><!-- #colophon -->
|
||||
|
||||
|
||||
</footer><!-- #colophon --> {# 页脚结束 #}
|
||||
@ -1 +1,2 @@
|
||||
print('hello world')
|
||||
# This is the main Python file
|
||||
|
||||
Loading…
Reference in new issue