diff --git a/config.json b/config.json index 2541eab..b7eee38 100644 --- a/config.json +++ b/config.json @@ -1,4 +1,5 @@ { "APPNAME": "", + "APPBRAND": "", "DBNAME": "smash.db" -} \ No newline at end of file +} diff --git a/smash/__init__.py b/smash/__init__.py index 4e7d058..30cf65f 100644 --- a/smash/__init__.py +++ b/smash/__init__.py @@ -11,6 +11,18 @@ conf = config.Config('config.json') if 'HEROKU' in os.environ: conf.add(('HEROKU', 1)) +# Load app name from environment if it's not in the config +if ('APPNAME' in conf.config and + conf.config['APPNAME']=="" and + 'APPNAME' in os.environ): + conf.add(('APPNAME', os.environ['APPNAME'])) + +# Load app brand name from environment if it's not in the config +if ('APPBRAND' in conf.config and + conf.config['APPBRAND']=="" and + 'APPBRAND' in os.environ): + conf.add(('APPBRAND', os.environ['APPBRAND'])) + db = database.Database(conf.config["DBNAME"]) models.init_models(db) diff --git a/smash/templates/base.html b/smash/templates/base.html index cd00633..3de0eeb 100644 --- a/smash/templates/base.html +++ b/smash/templates/base.html @@ -18,7 +18,7 @@