From f1ef9304fd11e2fe56f6432621488104724f3f60 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sun, 25 Oct 2020 17:08:50 +0800 Subject: [PATCH 01/51] kun --- README.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 125257e..4147191 100644 --- a/README.md +++ b/README.md @@ -4,4 +4,14 @@ kcweb作为web开发而设计的高性能框架,采用全新的架构思想,注重易用性。遵循MIT开源许可协议发布,意味着个人和企业可以免费使用kcweb,甚至允许把你基于kcweb开发的应用开源或商业产品发布或销售。 -[完整文档](https://intapp.kwebapp.cn/intapp/doc/index/finddoc/5/27/1 "文档") \ No newline at end of file +[完整文档](https://intapp.kwebapp.cn/intapp/doc/index/finddoc/5/27/1 "文档") + +开发环境下运行命令 +```` +python server.py +```` + +生产环境下运行命令 +```` +bash server.sh +```` \ No newline at end of file -- Gitee From 4f9f733ffab87ee7d9019512667f15c7b9fc84b7 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sun, 25 Oct 2020 17:32:48 +0800 Subject: [PATCH 02/51] kun --- kcweb/LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kcweb/LICENSE b/kcweb/LICENSE index 6cebfc2..e57e69a 100644 --- a/kcweb/LICENSE +++ b/kcweb/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2020 坤坤 +Copyright (c) 2020 冯树坤 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal -- Gitee From c90dd10dbf517f787d7b47002e1661259e14f9bd Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 26 Oct 2020 09:35:20 +0800 Subject: [PATCH 03/51] kyb --- kcweb/app.py | 1 + kcweb/common/request.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/kcweb/app.py b/kcweb/app.py index 96a717e..993ee85 100644 --- a/kcweb/app.py +++ b/kcweb/app.py @@ -365,6 +365,7 @@ class web: globals.HEADER.SERVER_PROTOCOL=header['SERVER_PROTOCOL'] globals.HEADER.HTTP_HOST=header['HTTP_HOST'] globals.HEADER.BODY_DATA=header['BODY_DATA'] + globals.HEADER.REMOTE_ADDR=header['REMOTE_ADDR'] try: globals.HEADER.files=header['files'] except: diff --git a/kcweb/common/request.py b/kcweb/common/request.py index 4a65a1d..76b9891 100644 --- a/kcweb/common/request.py +++ b/kcweb/common/request.py @@ -118,6 +118,8 @@ class HEADER: return kcwglobals.HEADER.HTTP_COOKIE def HTTP_USER_AGENT(): return kcwglobals.HEADER.HTTP_USER_AGENT + def REMOTE_ADDR(): + return kcwglobals.HEADER.REMOTE_ADDR def get_data(): "获取请求参数体" return kcwglobals.HEADER.BODY_DATA -- Gitee From 3d9bea08cce727d2bc3ff737acea8245762876ba Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 26 Oct 2020 09:56:37 +0800 Subject: [PATCH 04/51] kun --- app/common/__init__.py | 1 + app/common/model.py | 1 + app/intapp/controller/index/tpl/admin/adminlog.html | 13 +++++++------ 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/app/common/__init__.py b/app/common/__init__.py index 76817a7..8b66413 100644 --- a/app/common/__init__.py +++ b/app/common/__init__.py @@ -153,6 +153,7 @@ def after_request(body,status,resheader): "routeparam":routeparam, "getparam":getparam, "dataparam":dataparam, + "remote_addr":request.HEADER.REMOTE_ADDR(), "addtime":times() }) G.setadminlog="" diff --git a/app/common/model.py b/app/common/model.py index a52aead..6ec26a0 100644 --- a/app/common/model.py +++ b/app/common/model.py @@ -62,6 +62,7 @@ class model_app_admin_log(modelsqliteintapp): "routeparam":model.dbtype.varchar(LEN=11,DEFAULT=''), #路由参数 "getparam":model.dbtype.varchar(LEN=64,DEFAULT=''), #GET参数 "dataparam":model.dbtype.text(), #body参数 + "remote_addr":model.dbtype.varchar(LEN=64,DEFAULT=''), #请求物理ip "addtime":model.dbtype.int(LEN=11,DEFAULT=0) #添加时间 } try: diff --git a/app/intapp/controller/index/tpl/admin/adminlog.html b/app/intapp/controller/index/tpl/admin/adminlog.html index 20b2e38..b8c79f8 100644 --- a/app/intapp/controller/index/tpl/admin/adminlog.html +++ b/app/intapp/controller/index/tpl/admin/adminlog.html @@ -58,8 +58,8 @@ - - + + - - - - + + + + +