forked from Hostea/dashboard
hostfix: use default source code link when settings.py doesn't provide one
parent
e5ebdc29ce
commit
4a47543a0f
|
@ -65,7 +65,14 @@ source_code = None
|
||||||
def footer_ctx():
|
def footer_ctx():
|
||||||
global source_code
|
global source_code
|
||||||
if source_code is None:
|
if source_code is None:
|
||||||
source_code = {"text": "Source Code", "link": settings.HOSTEA["SOURCE_CODE"]}
|
if "SOURCE_CODE" in settings.HOSTEA:
|
||||||
|
source_code = {
|
||||||
|
"text": "Source Code",
|
||||||
|
"link": settings.HOSTEA["SOURCE_CODE"],
|
||||||
|
}
|
||||||
|
else:
|
||||||
|
link = "https://gitea.hostea.org/Hostea/dashboard"
|
||||||
|
source_code = {"text": "Source Code", "link": link}
|
||||||
try:
|
try:
|
||||||
r = Repo(".")
|
r = Repo(".")
|
||||||
commit = r.head.commit.hexsha
|
commit = r.head.commit.hexsha
|
||||||
|
|
Loading…
Reference in New Issue