Renamed node types attract.X → attract_X
This commit is contained in:
@@ -59,7 +59,7 @@ def attract_project_view(extra_project_projections=None):
|
|||||||
{'projection': projections},
|
{'projection': projections},
|
||||||
api=api)
|
api=api)
|
||||||
|
|
||||||
node_type = project.get_node_type('attract.task')
|
node_type = project.get_node_type('attract_task')
|
||||||
if not node_type:
|
if not node_type:
|
||||||
log.warning('createProject url=%s does not have node type attract.task',
|
log.warning('createProject url=%s does not have node type attract.task',
|
||||||
project_url)
|
project_url)
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
node_type_act = {
|
node_type_act = {
|
||||||
'name': 'attract.act',
|
'name': 'attract_act',
|
||||||
'description': 'Act node type',
|
'description': 'Act node type',
|
||||||
'parent': []
|
'parent': []
|
||||||
}
|
}
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
node_type_scene = {
|
node_type_scene = {
|
||||||
'name': 'attract.scene',
|
'name': 'attract_scene',
|
||||||
'description': 'Scene node type',
|
'description': 'Scene node type',
|
||||||
'parent': ['act'],
|
'parent': ['act'],
|
||||||
}
|
}
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
node_type_shot = {
|
node_type_shot = {
|
||||||
'name': 'attract.shot',
|
'name': 'attract_shot',
|
||||||
'description': 'Shot Node Type, for shots',
|
'description': 'Shot Node Type, for shots',
|
||||||
'dyn_schema': {
|
'dyn_schema': {
|
||||||
# TODO: document what this URL is used for.
|
# TODO: document what this URL is used for.
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
node_type_task = {
|
node_type_task = {
|
||||||
'name': 'attract.task',
|
'name': 'attract_task',
|
||||||
'description': 'Task Node Type, for tasks',
|
'description': 'Task Node Type, for tasks',
|
||||||
'dyn_schema': {
|
'dyn_schema': {
|
||||||
'status': {
|
'status': {
|
||||||
|
@@ -31,7 +31,7 @@ class TaskManager(object):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
api = pillar_api()
|
api = pillar_api()
|
||||||
node_type = project.get_node_type('attract.task')
|
node_type = project.get_node_type('attract_task')
|
||||||
if not node_type:
|
if not node_type:
|
||||||
raise ValueError('Project %s not set up for Attract' % project._id)
|
raise ValueError('Project %s not set up for Attract' % project._id)
|
||||||
|
|
||||||
|
@@ -8,13 +8,13 @@ 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 .modules import attract_project_view
|
||||||
|
from .node_types.task import node_type_task
|
||||||
from . import current_task_manager
|
from . import current_task_manager
|
||||||
|
|
||||||
blueprint = Blueprint('attract.tasks', __name__, url_prefix='/tasks')
|
blueprint = Blueprint('attract.tasks', __name__, url_prefix='/tasks')
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@blueprint.route('/')
|
@blueprint.route('/')
|
||||||
def index():
|
def index():
|
||||||
return render_template('attract/tasks/index.html')
|
return render_template('attract/tasks/index.html')
|
||||||
@@ -28,7 +28,7 @@ def for_project(project):
|
|||||||
tasks = pillarsdk.Node.all({
|
tasks = pillarsdk.Node.all({
|
||||||
'where': {
|
'where': {
|
||||||
'project': project['_id'],
|
'project': project['_id'],
|
||||||
'node_type': 'attract.task',
|
'node_type': node_type_task['name'],
|
||||||
}}, api=api)
|
}}, api=api)
|
||||||
|
|
||||||
return render_template('attract/tasks/for_project.html',
|
return render_template('attract/tasks/for_project.html',
|
||||||
@@ -41,7 +41,7 @@ def for_project(project):
|
|||||||
def view_embed_task(project, task_id):
|
def view_embed_task(project, task_id):
|
||||||
api = pillar_api()
|
api = pillar_api()
|
||||||
task = pillarsdk.Node.find(task_id, api=api)
|
task = pillarsdk.Node.find(task_id, api=api)
|
||||||
node_type = project.get_node_type('attract.task')
|
node_type = project.get_node_type(node_type_task['name'])
|
||||||
|
|
||||||
return render_template('attract/tasks/view_task_embed.html',
|
return render_template('attract/tasks/view_task_embed.html',
|
||||||
task=task,
|
task=task,
|
||||||
|
Reference in New Issue
Block a user