From a8b20f7882fbeaa5dab542bd266b1f1f33360113 Mon Sep 17 00:00:00 2001 From: yangjian <3280350050@qq.com> Date: Mon, 29 Jul 2019 17:38:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0404=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E8=A7=86=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- app_doc/views.py | 4 ++++ template/404.html | 55 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 template/404.html diff --git a/README.md b/README.md index 1532b02..65d971e 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ MrDoc拥有以下特点: - 仿GitBook文档阅读页面,支持文档阅读页面的字体缩放,字体类型修改; - 支持三级目录层级显示; -在开发过程中,参考和借鉴了GitBook、ShowDoc、Wordbook等应用的功能和样式,对此表示感谢。 +在开发过程中,参考和借鉴了GitBook、ShowDoc、Wordbook等应用的功能和样式。 ## 软件架构 基于Python Web框架Django构建。 diff --git a/app_doc/views.py b/app_doc/views.py index a111c1a..3746e85 100644 --- a/app_doc/views.py +++ b/app_doc/views.py @@ -392,3 +392,7 @@ def get_pro_doc(request): else: return JsonResponse({'status':False,'data':'方法错误'}) + +# 404页面 +def handle_404(request): + return render(request,'404.html') diff --git a/template/404.html b/template/404.html new file mode 100644 index 0000000..eddceb8 --- /dev/null +++ b/template/404.html @@ -0,0 +1,55 @@ +{% load staticfiles %} + + +
+ +