Moved attract.shots to attract.shots_and_assets
Assets are going to be pretty much the same thing as shots, with a few different properties. Hooks and much other code can be reused.
This commit is contained in:
@@ -10,7 +10,7 @@ from pillar.web.nodes.routes import url_for_node
|
|||||||
import pillarsdk
|
import pillarsdk
|
||||||
|
|
||||||
import attract.tasks
|
import attract.tasks
|
||||||
import attract.shots
|
import attract.shots_and_assets
|
||||||
|
|
||||||
EXTENSION_NAME = 'attract'
|
EXTENSION_NAME = 'attract'
|
||||||
|
|
||||||
@@ -22,7 +22,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.shots.ShotManager()
|
self.shot_manager = attract.shots_and_assets.ShotManager()
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def name(self):
|
def name(self):
|
||||||
@@ -64,14 +64,14 @@ class AttractExtension(PillarExtension):
|
|||||||
|
|
||||||
from . import routes
|
from . import routes
|
||||||
import attract.tasks.routes
|
import attract.tasks.routes
|
||||||
import attract.shots.routes
|
import attract.shots_and_assets.routes
|
||||||
import attract.subversion.routes
|
import attract.subversion.routes
|
||||||
|
|
||||||
return [
|
return [
|
||||||
routes.blueprint,
|
routes.blueprint,
|
||||||
attract.tasks.routes.blueprint,
|
attract.tasks.routes.blueprint,
|
||||||
attract.tasks.routes.perproject_blueprint,
|
attract.tasks.routes.perproject_blueprint,
|
||||||
attract.shots.routes.perproject_blueprint,
|
attract.shots_and_assets.routes.perproject_blueprint,
|
||||||
attract.subversion.routes.blueprint,
|
attract.subversion.routes.blueprint,
|
||||||
attract.subversion.routes.api_blueprint,
|
attract.subversion.routes.api_blueprint,
|
||||||
]
|
]
|
||||||
@@ -89,12 +89,12 @@ class AttractExtension(PillarExtension):
|
|||||||
def setup_app(self, app):
|
def setup_app(self, app):
|
||||||
"""Connects Blinker signals and sets up other app-dependent stuff in submodules."""
|
"""Connects Blinker signals and sets up other app-dependent stuff in submodules."""
|
||||||
|
|
||||||
from . import comments, subversion, tasks, eve_hooks, shots
|
from . import comments, subversion, tasks, eve_hooks, shots_and_assets
|
||||||
|
|
||||||
subversion.task_logged.connect(self.task_manager.api_task_logged_in_svn)
|
subversion.task_logged.connect(self.task_manager.api_task_logged_in_svn)
|
||||||
comments.setup_app(app)
|
comments.setup_app(app)
|
||||||
tasks.setup_app(app)
|
tasks.setup_app(app)
|
||||||
shots.setup_app(app)
|
shots_and_assets.setup_app(app)
|
||||||
eve_hooks.setup_app(app)
|
eve_hooks.setup_app(app)
|
||||||
|
|
||||||
# Imports for side-effects
|
# Imports for side-effects
|
||||||
|
@@ -407,7 +407,7 @@ class RequiredAfterCreationTest(AbstractShotTest):
|
|||||||
class ProjectSummaryTest(unittest.TestCase):
|
class ProjectSummaryTest(unittest.TestCase):
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
from attract.shots import ProjectSummary
|
from attract.shots_and_assets import ProjectSummary
|
||||||
|
|
||||||
self.summ = ProjectSummary()
|
self.summ = ProjectSummary()
|
||||||
self.summ.count(u'todo')
|
self.summ.count(u'todo')
|
||||||
|
Reference in New Issue
Block a user