Allow extensions to declare their icon.
The PillarExtension.icon() property returns the icon HTML class, for use like i.pi-{{ext.icon}}
This commit is contained in:
parent
0cf96e47e8
commit
43a04880e0
@ -32,6 +32,14 @@ class PillarExtension(object, metaclass=abc.ABCMeta):
|
||||
:rtype: unicode
|
||||
"""
|
||||
|
||||
@property
|
||||
def icon(self) -> str:
|
||||
"""Returns the icon HTML class, for use like i.pi-{{ext.icon}}
|
||||
|
||||
Defaults to the extension name.
|
||||
"""
|
||||
return self.name
|
||||
|
||||
@abc.abstractmethod
|
||||
def flask_config(self):
|
||||
"""Returns extension-specific defaults for the Flask configuration.
|
||||
|
Loading…
x
Reference in New Issue
Block a user