ooiservices/app/uframe/events.py
def create_event():
    '''
    Create a new event, the return will be right from uframe if all goes well.
    Either a success or an error message.
    Login required.
    '''
    try:
        data = json.loads(request.data)
        url = current_app.config['UFRAME_ASSETS_URL']\
            + '/%s/%s' % ('events', id)
        data['@class'] = data.pop('eventClass')
        response = requests.post(url,
                                 data=json.dumps(data),
                                 headers=_uframe_headers())
        cache.delete('event_list')
        return response.text, response.status_code

    except requests.exceptions.ConnectionError as e:
        error = "Error: Cannot connect to uframe.  %s" % e
        print error
        return make_response(error, 500)

    Create a new event, the return will be right from uframe if all goes well.
    Either a success or an error message.
    Login required.
    
Create a new event, the return will be right from uframe if all goes well.
Either a success or an error message.
Login required.
Create a new event the return will be right from uframe if all goes well . Either a success or an error message . Login required .
def create_event():
    try:
        data = json.loads(request.data)
        url = current_app.config['UFRAME_ASSETS_URL']\
            + '/%s/%s' % ('events', id)
        data['@class'] = data.pop('eventClass')
        response = requests.post(url,
                                 data=json.dumps(data),
                                 headers=_uframe_headers())
        cache.delete('event_list')
        return response.text, response.status_code
    except requests.exceptions.ConnectionError as e:
        error = "Error: Cannot connect to uframe.  %s" % e
        print error
        return make_response(error, 500)
def create_event ( ) : try : data = json . loads ( request . data ) url = current_app . config [ 'UFRAME_ASSETS_URL' ] + '/%s/%s' % ( 'events' , id ) data [ '@class' ] = data . pop ( 'eventClass' ) response = requests . post ( url , data = json . dumps ( data ) , headers = _uframe_headers ( ) ) cache . delete ( 'event_list' ) return response . text , response . status_code except requests . exceptions . ConnectionError as e : error = "Error: Cannot connect to uframe.  %s" % e print error return make_response ( error , 500 )
Create a new event, the return will be right from uframe if all goes well.
Create a new event the return will be right from uframe if all goes well .
'''
    Create a new event, the return will be right from uframe if all goes well.
    Either a success or an error message.
    Login required.
    '''