Add initial views for tempmon

This commit is contained in:
Lance Edgar 2016-11-21 23:53:20 -06:00
parent 668191b2e9
commit a39c347ad3
7 changed files with 363 additions and 5 deletions

View file

@ -26,8 +26,6 @@ Model Master View
from __future__ import unicode_literals, absolute_import
import re
import sqlalchemy as sa
from sqlalchemy import orm
@ -520,9 +518,7 @@ class MasterView(View):
"""
if hasattr(cls, 'model_title'):
return cls.model_title
title = cls.get_model_class().__name__
# convert "CamelCase" to "Camel Case"
return re.sub(r'([a-z])([A-Z])', r'\g<1> \g<2>', title)
return cls.get_model_class().get_model_title()
@classmethod
def get_model_title_plural(cls):