Jump to content

Recommended Posts

Posted

Really Thx in advanced .

 

Hi i am just new in the python world , i need to execute a flaskapp for whatsapp sending messages, i followed the steps to implement the flaskapp but i can't execute any code for python native or flask worst it produces an error i followed all the steps to implement flask

 

 

I really need to make it works the .htaccess looks like

 

/home/xtremese/public_html/inteygratemyfrank-i/.htaccess
RewriteEngine On
RewriteBase /
RewriteRule ^(media/.*)$ - [L]
RewriteRule ^(admin_media/.*)$ - [L]
RewriteRule ^(inteygratemyfrank-i\.wsgi/.*)$ - [L]
RewriteRule ^(.*)$ inteygratemyfrank-i/flask.wsgi/$1 [QSA,PT,L]

 

 

my flask.wsgi looks like

 

import os, sys
# edit your username below
sys.path.append("/home/xtremese/public_html/inteygratemyfrank-i");
sys.path.insert(0, os.path.dirname(__file__))
from myapp import app as application
# make the secret code a little better
application.secret_key = 'secret'
Create a python script named myapp.py
import sys
from flask import Flask, __version__
app = Flask(__name__)
application = app
@app.route("/")
def hello():
return """
HelioHost rules!<br><br>
<a href="/flask/python/version/">Python version</a><br>
<a href="/flask/flask/version/">Flask version</a>
"""
@app.route("/python/version/")
def p_version():
return "Python version %s" % sys.version
@app.route("/flask/version/")
def f_version():
return "Flask version %s" % __version__
if __name__ == "__main__":
app.run()

 

and my files structure looks like :

 

Posted

As it says at the top of http://wiki.helionet.org/Flask flask isn't available on Johnny. If you want to use flask with python 2.7 you need to be on the Ricky server, and if you want to use flask with python 3.6 you need to be on the Tommy server. Let us know if you need help moving.

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...