diff --git a/smash/__init__.py b/smash/__init__.py
index 365b271..3d9a9b1 100644
--- a/smash/__init__.py
+++ b/smash/__init__.py
@@ -1,5 +1,5 @@
import os
-from flask import Flask
+from flask import Flask, g
from flask.ext.sqlalchemy import SQLAlchemy
from . import config, log
diff --git a/smash/templates/base.html b/smash/templates/base.html
index ff6a754..acf7e98 100644
--- a/smash/templates/base.html
+++ b/smash/templates/base.html
@@ -12,7 +12,7 @@
{% endblock %}
{% if title %}
-
{{ title }} - {{ appname }}
+ {{ title }} - {{ g.appname }}
{% endif %}
@@ -20,7 +20,7 @@