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 Quote
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 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.