#!/usr/bin/env python # -*- coding: utf-8 -*- from actions import app from subprocess import call pin = '1234' if __name__ == "__main__": call(['bluetooth-agent %s &' % pin], shell=True) app.debug = True app.run('0.0.0.0')
import os from actions import app port = int(os.environ.get('PORT', 5000)) app.run(host='0.0.0.0', port=port)
from actions import app if __name__ == '__main__': app.run(host='0.0.0.0', port=5050)
elif filepath[0] == 'json': if filepath[1]: request.data = json.dumps( actions.app.read_file( './storage/%s' % ( filepath[ 1 ] ) ) ) return request.data elif filepath[0] == 'remove': if filepath[1]: actions.app.delete_file( './storage/%s' % ( filepath[ 1 ] ) ) return redirect( url_for( 'sinopse_dashboard' ) ) @app.route('/sinopse/new', methods=['POST']) def sinopse_new_file(): if request.method == 'POST': actions.app.create_file( './storage/%s.json' % ( request.form['file_name'] ) ) return redirect( url_for( 'sinopse_dashboard' ) ) @app.route('/about') def about(): conf = actions.app.configuration() return render_template( 'about.html', app=conf ) if __name__ == '__main__': app.debug = True app.run()