aboutsummaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorneodarz <neodarz@neodarz.net>2019-05-26 12:44:46 +0200
committerneodarz <neodarz@neodarz.net>2019-05-26 12:44:46 +0200
commit075cde20b4dbc9e43924a5b469a6bf3ddeb48d38 (patch)
tree5d27d78d01f6d493deebcb5ae868b8316d0c802e /utils
parent2e8c6dfd876d25a00897e05ae2883a47f79d3eea (diff)
downloadmy_new_personal_website-075cde20b4dbc9e43924a5b469a6bf3ddeb48d38.tar.xz
my_new_personal_website-075cde20b4dbc9e43924a5b469a6bf3ddeb48d38.zip
Move static_vars function to external file
Diffstat (limited to 'utils')
-rw-r--r--utils/utils.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/utils/utils.py b/utils/utils.py
index 1cabbdc8..44cf8e59 100644
--- a/utils/utils.py
+++ b/utils/utils.py
@@ -193,3 +193,11 @@ def postprocess_html_file(htmlfilepath):
htmlfileobj.seek(0)
htmlfileobj.write(str(soup))
htmlfileobj.truncate()
+
+
+def static_vars(**kwargs):
+ def decorate(func):
+ for k in kwargs:
+ setattr(func, k, kwargs[k])
+ return func
+ return decorate