diff --git a/tailbone/views/master.py b/tailbone/views/master.py index cae51b89..729948d2 100644 --- a/tailbone/views/master.py +++ b/tailbone/views/master.py @@ -2471,12 +2471,22 @@ class MasterView(View): return ['/mobile/master/{}.mako'.format(template)] return ['/master/{}.mako'.format(template)] + def get_default_engine_dbkey(self): + """ + Returns the "default" engine dbkey. + """ + return self.rattail_config.get( + 'tailbone', + 'engines.{}.pretend_default'.format(self.engine_type_key), + default='default') + def get_current_engine_dbkey(self): """ Returns the "current" engine's dbkey, for the current user. """ + default = self.get_default_engine_dbkey() return self.request.session.get('tailbone.engines.{}.current'.format(self.engine_type_key), - 'default') + default) def template_kwargs(self, **kwargs): """