!102 fix: view decorator does not forward default values if route result is None
From: @zhang-liang-pengkun Reviewed-by: @Charlie_li Signed-off-by: @Charlie_li
This commit is contained in:
commit
56e21a605a
@ -0,0 +1,26 @@
|
|||||||
|
From ef7b678bda31b9d5c3f7f4cffcdcf14137b4cdad Mon Sep 17 00:00:00 2001
|
||||||
|
From: Marcel Hellkamp <marc@gsites.de>
|
||||||
|
Date: Sun, 12 Jun 2022 20:54:46 +0200
|
||||||
|
Subject: [PATCH] fix: view decorator does not forward default values if route
|
||||||
|
result is None
|
||||||
|
|
||||||
|
---
|
||||||
|
bottle.py | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/bottle.py b/bottle.py
|
||||||
|
index 2266801..ed3076c 100644
|
||||||
|
--- a/bottle.py
|
||||||
|
+++ b/bottle.py
|
||||||
|
@@ -3682,7 +3682,7 @@ def view(tpl_name, **defaults):
|
||||||
|
tplvars.update(result)
|
||||||
|
return template(tpl_name, **tplvars)
|
||||||
|
elif result is None:
|
||||||
|
- return template(tpl_name, defaults)
|
||||||
|
+ return template(tpl_name, **defaults)
|
||||||
|
return result
|
||||||
|
return wrapper
|
||||||
|
return decorator
|
||||||
|
--
|
||||||
|
2.39.0.windows.2
|
||||||
|
|
||||||
@ -1,6 +1,6 @@
|
|||||||
Name: python-bottle
|
Name: python-bottle
|
||||||
Version: 0.12.13
|
Version: 0.12.13
|
||||||
Release: 21
|
Release: 22
|
||||||
Summary: WSGI micro web-framework for Python.
|
Summary: WSGI micro web-framework for Python.
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: http://bottlepy.org
|
URL: http://bottlepy.org
|
||||||
@ -20,6 +20,7 @@ Patch0010: 0009-Fix-for-Issue-586.patch
|
|||||||
Patch0011: 0010-Add-ServerAdapter-for-CherryPy-9.patch
|
Patch0011: 0010-Add-ServerAdapter-for-CherryPy-9.patch
|
||||||
Patch0012: 0011-Added-cheroot-server-adapter-to-list-of-server-names.patch
|
Patch0012: 0011-Added-cheroot-server-adapter-to-list-of-server-names.patch
|
||||||
Patch0013: 0012-fix-Cookie-test-falsely-reports-a-failure-for-some-p.patch
|
Patch0013: 0012-fix-Cookie-test-falsely-reports-a-failure-for-some-p.patch
|
||||||
|
Patch0014: 0013-fix-view-decorator-does-not-forward-default-values-i.patch
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
BuildRequires: python2-devel python2-setuptools python3-devel python3-setuptools
|
BuildRequires: python2-devel python2-setuptools python3-devel python3-setuptools
|
||||||
|
|
||||||
@ -74,6 +75,9 @@ sed -i '/^#!/d' bottle.py
|
|||||||
%{python3_sitelib}/*
|
%{python3_sitelib}/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Feb 28 2024 zhangliangpengkun<zhangliangpengkun@xfusion.com> - 0.12.13-22
|
||||||
|
- fix: view decorator does not forward default values if route result is None
|
||||||
|
|
||||||
* Tue Jan 30 2024 zhangliangpengkun<zhangliangpengkun@xfusion.com> - 0.12.13-21
|
* Tue Jan 30 2024 zhangliangpengkun<zhangliangpengkun@xfusion.com> - 0.12.13-21
|
||||||
- fix: Cookie test falsely reports a failure for some python versions.
|
- fix: Cookie test falsely reports a failure for some python versions.
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user