Page MenuHome

__init__.py
No OneTemporary

__init__.py

from pillar.extension import PillarExtension
from .modules import blueprint
from . import task_manager
class AttractExtension(PillarExtension):
def __init__(self):
self.task_manager = task_manager.TaskManager()
@property
def name(self):
return '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 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 {
'DOMAIN': {
'tasks': {
'schema': {
'name': {
'type': 'string',
},
}
}
}
}
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 [blueprint]
@property
def template_path(self):
import os.path
return os.path.join(os.path.dirname(__file__), 'templates')
def setup_app(self, app):
"""Connects Blinker signals."""
from . import subversion
subversion.task_logged.connect(self.task_manager.task_logged_in_svn)

File Metadata

Mime Type
text/x-python
Expires
Sat, Aug 13, 11:23 PM (2 d)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
87/e5/129da13447123301a188da2de92b

Event Timeline