diff --git a/pillar/application/__init__.py b/pillar/application/__init__.py index e1425eb8..4885ad1e 100644 --- a/pillar/application/__init__.py +++ b/pillar/application/__init__.py @@ -86,7 +86,8 @@ class ValidateCustomFields(Validator): # We specify a settings.py file because when running on wsgi we can't detect it # automatically. The default path (which works in Docker) can be overriden with # an env variable. -settings_path = os.environ.get('EVE_SETTINGS', '/data/git/pillar/pillar/settings.py') +settings_path = os.environ.get( + 'EVE_SETTINGS', '/data/git/pillar/pillar/settings.py') app = Eve(settings=settings_path, validator=ValidateCustomFields, auth=NewAuth) import config @@ -98,10 +99,9 @@ log = logging.getLogger(__name__) log.setLevel(logging.DEBUG if app.config['DEBUG'] else logging.INFO) log.info('Pillar starting') - bugsnag.configure( - api_key = app.config['BUGSNAG_API_KEY'], - project_root = "/data/git/pillar/pillar", + api_key=app.config['BUGSNAG_API_KEY'], + project_root="/data/git/pillar/pillar", ) handle_exceptions(app) @@ -211,7 +211,7 @@ def item_parse_attachments(response): """Before returning a response, check if the 'attachments' property is defined. If yes, load the file (for the moment only images) in the required variation, get the link and build a Markdown representation. Search in the - 'field' specified in the attachmentand replace the 'slug' tag with the + 'field' specified in the attachment and replace the 'slug' tag with the generated link. """ if 'properties' in response and 'attachments' in response['properties']: diff --git a/pillar/manage.py b/pillar/manage.py index 83684279..3380b3d6 100644 --- a/pillar/manage.py +++ b/pillar/manage.py @@ -5,17 +5,13 @@ from eve.methods.put import put_internal from eve.methods.post import post_internal from flask.ext.script import Manager from application import app -from manage.node_types.act import node_type_act from manage.node_types.asset import node_type_asset from manage.node_types.blog import node_type_blog from manage.node_types.comment import node_type_comment from manage.node_types.group import node_type_group from manage.node_types.post import node_type_post from manage.node_types.project import node_type_project -from manage.node_types.scene import node_type_scene -from manage.node_types.shot import node_type_shot from manage.node_types.storage import node_type_storage -from manage.node_types.task import node_type_task from manage.node_types.texture import node_type_texture from manage.node_types.group_texture import node_type_group_texture @@ -23,6 +19,7 @@ manager = Manager(app) MONGO_HOST = os.environ.get('MONGO_HOST', 'localhost') + @manager.command def runserver(): try: @@ -102,6 +99,7 @@ def setup_db(): # TODO: Create a default project + @manager.command def clear_db(): """Wipes the database