Jump to content

[Answered] How Debug A Application Python Wsgi In Tommy


cgarcia

Recommended Posts

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"

 

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...