amserver Posted April 9, 2021 Posted April 9, 2021 Hi there, I'm in Johnny server. I followed how to start flask app in the server. I'm just wondering how to import function from the cloudapi.py to the myapp.py, for example: file: myapp.py from cloudapi import * Structure of the folder in/home/mowaseem/public_html/flask/ | |_____ .htaccess | |_____ cloudapi.py | |_____ flask.wsgi | |_____ myapp.py | |_____ settings.conf
verne100 Posted April 19, 2021 Posted April 19, 2021 Hi there, I'm in Johnny server. I followed how to start flask app in the server. I'm just wondering how to import function from the cloudapi.py to the myapp.py, for example: file: myapp.py from cloudapi import * Structure of the folder in/home/mowaseem/public_html/flask/ | |_____ .htaccess | |_____ cloudapi.py | |_____ flask.wsgi | |_____ myapp.py | |_____ settings.conf I think you just write import cloudapi at the top of the myapp.py. Then you can call cloudapi.function() in myapp
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now