Commit 70a5c1dc authored by Denis Bilenko's avatar Denis Bilenko

fix examples in regard to wsgi2->wsgi name change

parent 5d8fb9ea
#!/usr/bin/python #!/usr/bin/python
from gevent import monkey; monkey.patch_all() from gevent import monkey; monkey.patch_all()
from gevent import wsgi2 from gevent.wsgi import WSGIServer
import os import os
import traceback import traceback
from django.core.handlers.wsgi import WSGIHandler from django.core.handlers.wsgi import WSGIHandler
...@@ -16,5 +16,5 @@ got_request_exception.connect(exception_printer) ...@@ -16,5 +16,5 @@ got_request_exception.connect(exception_printer)
call_command('syncdb') call_command('syncdb')
print 'Serving on 8088...' print 'Serving on 8088...'
wsgi2.WSGIServer(('', 8088), WSGIHandler()).serve_forever() WSGIServer(('', 8088), WSGIHandler()).serve_forever()
#!/usr/bin/python #!/usr/bin/python
from gevent import monkey; monkey.patch_all() from gevent import monkey; monkey.patch_all()
from gevent import wsgi2 from gevent import wsgi
import sys import sys
import re import re
import traceback import traceback
...@@ -109,5 +109,5 @@ if __name__ == '__main__': ...@@ -109,5 +109,5 @@ if __name__ == '__main__':
#import doctest #import doctest
#doctest.testmod() #doctest.testmod()
print 'Serving on 8088...' print 'Serving on 8088...'
wsgi2.WSGIServer(('', 8088), application).serve_forever() wsgi.WSGIServer(('', 8088), application).serve_forever()
#!/usr/bin/python #!/usr/bin/python
"""WSGI server example""" """WSGI server example"""
from gevent import wsgi2 from gevent import wsgi
def hello_world(env, start_response): def hello_world(env, start_response):
if env['PATH_INFO'] == '/': if env['PATH_INFO'] == '/':
...@@ -12,5 +12,5 @@ def hello_world(env, start_response): ...@@ -12,5 +12,5 @@ def hello_world(env, start_response):
return ['Not Found\r\n'] return ['Not Found\r\n']
print 'Serving on 8088...' print 'Serving on 8088...'
wsgi2.WSGIServer(('', 8088), hello_world).serve_forever() wsgi.WSGIServer(('', 8088), hello_world).serve_forever()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment