Code cleanup and improved formatting

This commit is contained in:
2016-03-14 12:13:49 +01:00
parent ca52e432ff
commit 086284b883
2 changed files with 7 additions and 9 deletions

View File

@@ -86,7 +86,8 @@ class ValidateCustomFields(Validator):
# We specify a settings.py file because when running on wsgi we can't detect it # 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 # automatically. The default path (which works in Docker) can be overriden with
# an env variable. # 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) app = Eve(settings=settings_path, validator=ValidateCustomFields, auth=NewAuth)
import config import config
@@ -98,7 +99,6 @@ log = logging.getLogger(__name__)
log.setLevel(logging.DEBUG if app.config['DEBUG'] else logging.INFO) log.setLevel(logging.DEBUG if app.config['DEBUG'] else logging.INFO)
log.info('Pillar starting') log.info('Pillar starting')
bugsnag.configure( bugsnag.configure(
api_key=app.config['BUGSNAG_API_KEY'], api_key=app.config['BUGSNAG_API_KEY'],
project_root="/data/git/pillar/pillar", project_root="/data/git/pillar/pillar",

View File

@@ -5,17 +5,13 @@ from eve.methods.put import put_internal
from eve.methods.post import post_internal from eve.methods.post import post_internal
from flask.ext.script import Manager from flask.ext.script import Manager
from application import app 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.asset import node_type_asset
from manage.node_types.blog import node_type_blog from manage.node_types.blog import node_type_blog
from manage.node_types.comment import node_type_comment from manage.node_types.comment import node_type_comment
from manage.node_types.group import node_type_group from manage.node_types.group import node_type_group
from manage.node_types.post import node_type_post from manage.node_types.post import node_type_post
from manage.node_types.project import node_type_project 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.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.texture import node_type_texture
from manage.node_types.group_texture import node_type_group_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') MONGO_HOST = os.environ.get('MONGO_HOST', 'localhost')
@manager.command @manager.command
def runserver(): def runserver():
try: try:
@@ -102,6 +99,7 @@ def setup_db():
# TODO: Create a default project # TODO: Create a default project
@manager.command @manager.command
def clear_db(): def clear_db():
"""Wipes the database """Wipes the database