Jump to content

[Answered] How Debug A Application Python Wsgi In Tommy


Recommended Posts

Posted

Hello.

someone knows, how to debug an application flask in python this is my code

 

/home/cgarciar/public_html/flask/myapp.py

 

#! /usr/bin/python3.6

import sys
from flask import Flask
#, __version__
app = Flask(__name__)
application = app

@app.route("/")
def hello():
return "Hello world!"

@app.route("/flask/version/")
def p_version():
return "Flask version %s" % __version__

if __name__ == "__main__":
app.run()

 

 

and file : /home/cgarciar/public_html/flask/flask.wsgi

 

#! /usr/bin/python3.6

import sys
import os

sys.path.append('/home/cgarciar/public_html/flask')

os.path.insert(0,os.path.dirname(__file__))
from myapp import app as application

# make the secret code a little better
application.secret_key = 'secret'

 

 

with permission 755

 

y result see "http://www.cesly.heliohost.org/flask/flask"

 

 

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...