Add initial views for tempmon
This commit is contained in:
parent
668191b2e9
commit
a39c347ad3
7 changed files with 363 additions and 5 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue