Search Results

Search found 2 results on 1 pages for 'vjk2005'.

Page 1/1 | 1 

  • "ImportError: No module named flask" - Trouble with nginx + uWSGI + Flask in a virtualenv setup

    - by vjk2005
    I got nginx + uWSGI running on localhost inside a virtualenv with a simple hello world program, but I get this error when I replace the hello world with a simple Flask app: File "./wsgi_configuration_module.py", line 1, in <module> from flask import Flask ImportError: No module named flask unable to load app mountpoint Here's the flask app (wsgi_configuration_module.py): from flask import Flask application = Flask(__name__) @application.route("/") def hello(): return "hello world" if __name__ == "__main__": application.run() uWSGI config (app_conf.xml): <uwsgi> <socket>127.0.0.1:9001</socket> <chdir>/srv/www/labs/application</chdir> <pythonpath>/srv/www</pythonpath> <module>wsgi_configuration_module</module> <callable>application</callable> <no-site>true</no-site> </uwsgi> nginx config: server { listen 80; server_name localhost; access_log /srv/www/labs/logs/access.log; error_log /srv/www/labs/logs/error.log; location / { include uwsgi_params; uwsgi_pass 127.0.0.1:9001; } location /static { root /srv/www/labs/public_html/static/; index index.html index.htm; } } virtualenv stored in ~/virtual_env with Python 2.7 + nginx + uWSGI + Flask installed in a virtualenv called basic. Things I've tried to solve this: set the --home (-H) option to my virtualenv folder ~/virtual_env while running uWSGI. Other info: I have the same setup working outside of a virtualenv. Things go wrong only when I try to replicate the setup inside of a virtualenv. Where have I gone wrong?

    Read the article

  • how to enable iFrame designMode in a local webpage without using the localhost server?

    - by vjk2005
    The code... <html> <body> <iframe id="editableFrame"></iframe> <script type="text/javascript"> editableFrame.document.designMode="on"; </script> </body> </html> gets the iFrame editable only when run off a server(http://...)(online or from localhost). How do I get this working by simply opening it up as a local html file(file:///...) in the browser? Some browser specific notes: 1. Firefox needs slightly different code to enable designMode but the problem still remains. 2. IE8 gets me the behavior I want with this code, but it pops up a warning about enabling ActiveX controls which the user must accept before getting the iFrame editable. 3. Opera 10.5 is the only browser that has the behavior I want... iFrames are editable without needing to run the code off a server.

    Read the article

1