Added Attract extension.
For now it just contains a management command, but I ensured it is registered properly through the Pillar extension system.
This commit is contained in:
43
bcloud/attract/extension.py
Normal file
43
bcloud/attract/extension.py
Normal file
@@ -0,0 +1,43 @@
|
||||
"""Pillar extension for Attract."""
|
||||
|
||||
from pillar.extension import PillarExtension
|
||||
|
||||
|
||||
class AttractExtension(PillarExtension):
|
||||
@property
|
||||
def name(self):
|
||||
return u'Attract'
|
||||
|
||||
def flask_config(self):
|
||||
"""Returns extension-specific defaults for the Flask configuration.
|
||||
|
||||
Use this to set sensible default values for configuration settings
|
||||
introduced by the extension.
|
||||
|
||||
:rtype: dict
|
||||
"""
|
||||
|
||||
# Just so that it registers the management commands.
|
||||
from . import cli
|
||||
|
||||
return {}
|
||||
|
||||
def blueprints(self):
|
||||
"""Returns the list of top-level blueprints for the extension.
|
||||
|
||||
These blueprints will be mounted at the url prefix given to
|
||||
app.load_extension().
|
||||
|
||||
:rtype: list of flask.Blueprint objects.
|
||||
"""
|
||||
return []
|
||||
|
||||
def eve_settings(self):
|
||||
"""Returns extensions to the Eve settings.
|
||||
|
||||
Currently only the DOMAIN key is used to insert new resources into
|
||||
Eve's configuration.
|
||||
|
||||
:rtype: dict
|
||||
"""
|
||||
return {}
|
Reference in New Issue
Block a user