Luke Ross

Colorado

4 releases git clone https://lukeross.name/projects/colorado.git/

Web-based git repository viewer.

Commit da9b0eb11efaf0e93566ce745f41a5b38e58180d

Simplify name logic.

Committed 9 Aug 2017 by Luke Ross

src/colorado/views.py

@@ -54,10 +54,10 @@ def configure_template(tpl, repo=None):
 	run_on_meld(tpl, "static-js", lambda n: n.set("src", url_for(
 		".static", filename="colorado.js"
 	)))
-	run_on_meld(tpl, "html-title", lambda n: n.content(
-		repo.name if repo else current_app.config.get("SITE_NAME", "Git Viewer")
-	))
 	if repo:
+		run_on_meld(tpl, "html-title", lambda n: n.content(
+			repo.name
+		))
 		git = repo.repo
 		tpl.findmeld("repo-name").content(repo.name)
 		tpl.findmeld("repo-name").set("href", url_for(