def admin_move_content(entityId): content = ContentModel.get_by_id(entityId) jsd = request_helper.get_json_data() content.category = CategoryModel.get_by_id(long(jsd['category_id'])) content.put() return json.dumps(content.to_dict())
def admin_delete_content(entityId): if request.method == 'DELETE' or request.values['_method'] == 'DELETE': ContentModel.get_by_id(entityId).delete() return "{ 'value' : 'OK' }" pass