PEP8 formatting

This commit is contained in:
2016-03-15 16:17:25 +01:00
parent e06a9fdf34
commit 3334761ea7
4 changed files with 7 additions and 3 deletions

View File

@@ -9,7 +9,6 @@ from algoliasearch import algoliasearch
from zencoder import Zencoder
from flask import g
from flask import request
from flask import url_for
from flask import abort
from eve import Eve
@@ -193,6 +192,7 @@ def before_inserting_nodes(items):
if project:
item['project'] = project['_id']
def after_inserting_nodes(items):
for item in items:
context_object_id = item['parent']
@@ -289,10 +289,12 @@ def project_node_type_has_method(response):
# Check permissions and append the allowed_methods to the node_type
check_permissions(node_type, 'GET', append_allowed_methods=True)
def before_returning_item_notifications(response):
if request.args.get('parse'):
notification_parse(response)
def before_returning_resource_notifications(response):
for item in response['_items']:
if request.args.get('parse'):

View File

@@ -7,6 +7,7 @@ from application import app
encoding = Blueprint('encoding', __name__)
@encoding.route('/zencoder/notifications', methods=['POST'])
def zencoder_notifications():
if app.config['ENCODING_BACKEND'] == 'zencoder':

View File

@@ -2,6 +2,7 @@ from flask import g
from eve.methods.post import post_internal
from application import app
def notification_parse(notification):
# notification = dict(a='n')
# TODO: finish fixing this

View File

@@ -31,8 +31,8 @@ def check_permissions(resource, method, append_allowed_methods=False):
# from there
computed_permissions = resource['node_type']['permissions']
else:
# If the node_type is referenced with an ObjectID (was not embedded on
# request) query for if from the database and get the permissions
# If the node_type is referenced with an ObjectID (was not embedded
# on request) query for if from the database and get the permissions
# node_types_collection = app.data.driver.db['node_types']
# node_type = node_types_collection.find_one(resource['node_type'])