ready for 0.9.8 release

This commit is contained in:
roberto@debian32
2011-06-05 08:20:23 +02:00
parent f35a36ac02
commit b7525475d8
8 changed files with 85 additions and 3 deletions
+4 -2
View File
@@ -114,7 +114,6 @@ int init_uwsgi_app(int loader, void *arg1, struct wsgi_request *wsgi_req, PyThre
uwsgi_log("%s = %s\n", PyString_AsString(k), PyString_AsString(env_value));
if (PyObject_SetItem(py_environ, k, env_value)) {
uwsgi_log("cazzo\n");
PyErr_Print();
}
@@ -521,6 +520,9 @@ PyObject *uwsgi_file_loader(void *arg1) {
PyObject *wsgi_file_module, *wsgi_file_dict;
PyObject *wsgi_file_callable;
char *callable = up.callable;
if (!callable) callable = "application";
wsgi_file_module = uwsgi_pyimport_by_filename("uwsgi_wsgi_file", filename);
// no need to check here for module import as it is already done by uwsgi_pyimport_by_file
@@ -530,7 +532,7 @@ PyObject *uwsgi_file_loader(void *arg1) {
exit(1);
}
wsgi_file_callable = PyDict_GetItemString(wsgi_file_dict, "application");
wsgi_file_callable = PyDict_GetItemString(wsgi_file_dict, callable);
if (!wsgi_file_callable) {
PyErr_Print();
uwsgi_log( "unable to find \"application\" callable in file %s\n", filename);
+2 -1
View File
@@ -3796,7 +3796,8 @@ void uwsgi_init_all_apps() {
}
// no app initialized and virtualhosting enabled
if (uwsgi.apps_cnt == 0 && uwsgi.vhost) {
if (uwsgi.apps_cnt == 0) {
uwsgi_log("*** no app loaded. going in full dynamic mode ***\n");
uwsgi.apps_cnt = 1;
}
+6
View File
@@ -0,0 +1,6 @@
from flask import Flask
app = Flask(__name__)
@app.route("/")
def hello():
return "Hello World!"
+6
View File
@@ -0,0 +1,6 @@
from flask import Flask
app = Flask(__name__)
@app.route("/")
def hello():
return "Hello World! app2 !!!"
+6
View File
@@ -0,0 +1,6 @@
from flask import Flask
app = Flask(__name__)
@app.route("/")
def hello():
return "Hello World! app3"
+6
View File
@@ -0,0 +1,6 @@
from flask import Flask
app = Flask(__name__)
@app.route("/")
def hello():
return "Hello World! app4"
+6
View File
@@ -0,0 +1,6 @@
from flask import Flask
app = Flask(__name__)
@app.route("/")
def hello():
return "Hello World! app5"
+49
View File
@@ -0,0 +1,49 @@
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
gzip on;
upstream uwsgi_server {
server 127.0.0.1:3031;
}
include uwsgi_params;
uwsgi_param UWSGI_FILE $app;
uwsgi_param UWSGI_PYHOME $virtualenv;
server {
listen 8026;
server_name flask001;
set $app vhosttest/flask001/app1.py;
set $virtualenv vhosttest/venv001;
location / {
uwsgi_pass uwsgi_server;
}
}
server {
listen 8026;
server_name flask002;
set $app vhosttest/flask002/app2.py;
set $virtualenv vhosttest/venv001;
location / {
uwsgi_pass uwsgi_server;
}
}
}