From 0179fa71155302b79289d368c6325f382ccc5f97 Mon Sep 17 00:00:00 2001 From: CodeKevin Date: Sun, 15 Mar 2015 14:55:50 -0400 Subject: [PATCH] Custom CTF Name --- CTFd/utils.py | 6 ++++++ templates/base.html | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CTFd/utils.py b/CTFd/utils.py index b0a96d9..7b26e23 100644 --- a/CTFd/utils.py +++ b/CTFd/utils.py @@ -23,6 +23,12 @@ def init_utils(app): app.jinja_env.globals.update(pages=pages) app.jinja_env.globals.update(can_register=can_register) app.jinja_env.globals.update(mailserver=mailserver) + app.jinja_env.globals.update(ctf_name=ctf_name()) + + +def ctf_name(): + name = get_config('ctf_name') + return name if name else 'CTF' def pages(): diff --git a/templates/base.html b/templates/base.html index 217fdb8..f523519 100644 --- a/templates/base.html +++ b/templates/base.html @@ -1,7 +1,7 @@ - + {{ ctf_name }} - @@ -17,7 +17,7 @@