Moved shot-related code to a new attract.shots package
This commit is contained in:
@@ -1,11 +1,12 @@
|
|||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
import attract.shots
|
||||||
import flask
|
import flask
|
||||||
from werkzeug.local import LocalProxy
|
from werkzeug.local import LocalProxy
|
||||||
from pillar.extension import PillarExtension
|
from pillar.extension import PillarExtension
|
||||||
|
|
||||||
import attract.tasks
|
import attract.tasks
|
||||||
import attract.shot_manager
|
import attract.shots
|
||||||
|
|
||||||
EXTENSION_NAME = 'attract'
|
EXTENSION_NAME = 'attract'
|
||||||
|
|
||||||
@@ -14,7 +15,7 @@ class AttractExtension(PillarExtension):
|
|||||||
def __init__(self):
|
def __init__(self):
|
||||||
self._log = logging.getLogger('%s.AttractExtension' % __name__)
|
self._log = logging.getLogger('%s.AttractExtension' % __name__)
|
||||||
self.task_manager = attract.tasks.TaskManager()
|
self.task_manager = attract.tasks.TaskManager()
|
||||||
self.shot_manager = attract.shot_manager.ShotManager()
|
self.shot_manager = attract.shots.ShotManager()
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def name(self):
|
def name(self):
|
||||||
@@ -54,15 +55,16 @@ class AttractExtension(PillarExtension):
|
|||||||
:rtype: list of flask.Blueprint objects.
|
:rtype: list of flask.Blueprint objects.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from . import modules, shots
|
from . import modules
|
||||||
import attract.tasks.routes
|
import attract.tasks.routes
|
||||||
|
import attract.shots.routes
|
||||||
|
|
||||||
return [
|
return [
|
||||||
modules.blueprint,
|
modules.blueprint,
|
||||||
attract.tasks.routes.blueprint,
|
attract.tasks.routes.blueprint,
|
||||||
attract.tasks.routes.perproject_blueprint,
|
attract.tasks.routes.perproject_blueprint,
|
||||||
shots.blueprint,
|
attract.shots.routes.blueprint,
|
||||||
shots.perproject_blueprint,
|
attract.shots.routes.perproject_blueprint,
|
||||||
]
|
]
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
"""Shot management."""
|
"""Shot management."""
|
||||||
|
|
||||||
|
|
||||||
import collections
|
import collections
|
||||||
|
|
||||||
import attr
|
import attr
|
||||||
@@ -8,9 +9,8 @@ import flask_login
|
|||||||
import pillarsdk
|
import pillarsdk
|
||||||
from pillar.web.system_util import pillar_api
|
from pillar.web.system_util import pillar_api
|
||||||
|
|
||||||
from . import attrs_extra
|
from attract import attrs_extra
|
||||||
from .node_types.shot import node_type_shot
|
from attract.node_types import node_type_shot, node_type_task
|
||||||
from .node_types.task import node_type_task
|
|
||||||
|
|
||||||
|
|
||||||
@attr.s
|
@attr.s
|
@@ -6,9 +6,9 @@ import flask
|
|||||||
import pillarsdk
|
import pillarsdk
|
||||||
from pillar.web.system_util import pillar_api
|
from pillar.web.system_util import pillar_api
|
||||||
|
|
||||||
from .modules import attract_project_view
|
from attract.modules import attract_project_view
|
||||||
from .node_types.shot import node_type_shot
|
from attract.node_types.shot import node_type_shot
|
||||||
from . import current_attract
|
from attract import current_attract
|
||||||
|
|
||||||
blueprint = Blueprint('attract.shots', __name__, url_prefix='/shots')
|
blueprint = Blueprint('attract.shots', __name__, url_prefix='/shots')
|
||||||
perproject_blueprint = Blueprint('attract.shots.perproject', __name__,
|
perproject_blueprint = Blueprint('attract.shots.perproject', __name__,
|
Reference in New Issue
Block a user