1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/examples/WSGI/CalendarApp.py Thu Sep 27 22:48:48 2007 +0000 1.3 @@ -0,0 +1,18 @@ 1.4 +#!/usr/bin/env python 1.5 + 1.6 +# Uncomment and adjust the paths below if WebStack is not installed somewhere 1.7 +# on the PYTHONPATH. 1.8 + 1.9 +#import sys 1.10 +#sys.path.append("/home/paulb/Software/Python/WebStack") 1.11 +#sys.path.append("/home/paulb/Software/Python/WebStack/examples/Common") 1.12 + 1.13 +from WebStack.Adapters.WSGI import deploy 1.14 +from Calendar import CalendarResource 1.15 + 1.16 +# Choose or customise one of the following if the example fails. 1.17 + 1.18 +deploy(CalendarResource()) 1.19 +#deploy(CalendarResource("iso-8859-1")) 1.20 + 1.21 +# vim: tabstop=4 expandtab shiftwidth=4
2.1 --- a/examples/WSGI/CalendarHandler.py Thu Sep 27 22:40:25 2007 +0000 2.2 +++ b/examples/WSGI/CalendarHandler.py Thu Sep 27 22:48:48 2007 +0000 2.3 @@ -7,12 +7,12 @@ 2.4 #sys.path.append("/home/paulb/Software/Python/WebStack") 2.5 #sys.path.append("/home/paulb/Software/Python/WebStack/examples/Common") 2.6 2.7 -from WebStack.Adapters.WSGI import deploy 2.8 +from WebStack.Adapters.WSGI import deploy_as_cgi 2.9 from Calendar import CalendarResource 2.10 2.11 # Choose or customise one of the following if the example fails. 2.12 2.13 -deploy(CalendarResource()) 2.14 -#deploy(CalendarResource("iso-8859-1")) 2.15 +deploy_as_cgi(CalendarResource()) 2.16 +#deploy_as_cgi(CalendarResource("iso-8859-1")) 2.17 2.18 # vim: tabstop=4 expandtab shiftwidth=4
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 3.2 +++ b/examples/WSGI/CookiesApp.py Thu Sep 27 22:48:48 2007 +0000 3.3 @@ -0,0 +1,15 @@ 3.4 +#!/usr/bin/env python 3.5 + 3.6 +# Uncomment and adjust the paths below if WebStack is not installed somewhere 3.7 +# on the PYTHONPATH. 3.8 + 3.9 +#import sys 3.10 +#sys.path.append("/home/paulb/Software/Python/WebStack") 3.11 +#sys.path.append("/home/paulb/Software/Python/WebStack/examples/Common") 3.12 + 3.13 +from WebStack.Adapters.WSGI import deploy 3.14 +from Cookies import CookiesResource 3.15 + 3.16 +deploy(CookiesResource()) 3.17 + 3.18 +# vim: tabstop=4 expandtab shiftwidth=4
4.1 --- a/examples/WSGI/CookiesHandler.py Thu Sep 27 22:40:25 2007 +0000 4.2 +++ b/examples/WSGI/CookiesHandler.py Thu Sep 27 22:48:48 2007 +0000 4.3 @@ -7,9 +7,9 @@ 4.4 #sys.path.append("/home/paulb/Software/Python/WebStack") 4.5 #sys.path.append("/home/paulb/Software/Python/WebStack/examples/Common") 4.6 4.7 -from WebStack.Adapters.WSGI import deploy 4.8 +from WebStack.Adapters.WSGI import deploy_as_cgi 4.9 from Cookies import CookiesResource 4.10 4.11 -deploy(CookiesResource()) 4.12 +deploy_as_cgi(CookiesResource()) 4.13 4.14 # vim: tabstop=4 expandtab shiftwidth=4
5.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 5.2 +++ b/examples/WSGI/FormApp.py Thu Sep 27 22:48:48 2007 +0000 5.3 @@ -0,0 +1,15 @@ 5.4 +#!/usr/bin/env python 5.5 + 5.6 +# Uncomment and adjust the paths below if WebStack is not installed somewhere 5.7 +# on the PYTHONPATH. 5.8 + 5.9 +#import sys 5.10 +#sys.path.append("/home/paulb/Software/Python/WebStack") 5.11 +#sys.path.append("/home/paulb/Software/Python/WebStack/examples/Common") 5.12 + 5.13 +from WebStack.Adapters.WSGI import deploy 5.14 +from Form import FormResource 5.15 + 5.16 +deploy(FormResource()) 5.17 + 5.18 +# vim: tabstop=4 expandtab shiftwidth=4
6.1 --- a/examples/WSGI/FormHandler.py Thu Sep 27 22:40:25 2007 +0000 6.2 +++ b/examples/WSGI/FormHandler.py Thu Sep 27 22:48:48 2007 +0000 6.3 @@ -7,9 +7,9 @@ 6.4 #sys.path.append("/home/paulb/Software/Python/WebStack") 6.5 #sys.path.append("/home/paulb/Software/Python/WebStack/examples/Common") 6.6 6.7 -from WebStack.Adapters.WSGI import deploy 6.8 +from WebStack.Adapters.WSGI import deploy_as_cgi 6.9 from Form import FormResource 6.10 6.11 -deploy(FormResource()) 6.12 +deploy_as_cgi(FormResource()) 6.13 6.14 # vim: tabstop=4 expandtab shiftwidth=4
7.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 7.2 +++ b/examples/WSGI/LoginApp.py Thu Sep 27 22:48:48 2007 +0000 7.3 @@ -0,0 +1,25 @@ 7.4 +#!/usr/bin/env python 7.5 + 7.6 +# Uncomment and adjust the paths below if WebStack is not installed somewhere 7.7 +# on the PYTHONPATH. 7.8 + 7.9 +#import sys 7.10 +#sys.path.append("/home/paulb/Software/Python/WebStack") 7.11 +#sys.path.append("/home/paulb/Software/Python/WebStack/examples/Common") 7.12 + 7.13 +from WebStack.Adapters.WSGI import deploy 7.14 +from WebStack.Resources.Login import LoginResource, LoginAuthenticator 7.15 + 7.16 +deploy( 7.17 + LoginResource( 7.18 + LoginAuthenticator( 7.19 + secret_key="horses", 7.20 + credentials=( 7.21 + ("badger", "abc"), 7.22 + ("vole", "xyz"), 7.23 + ) 7.24 + ) 7.25 + ) 7.26 +) 7.27 + 7.28 +# vim: tabstop=4 expandtab shiftwidth=4
8.1 --- a/examples/WSGI/LoginHandler.py Thu Sep 27 22:40:25 2007 +0000 8.2 +++ b/examples/WSGI/LoginHandler.py Thu Sep 27 22:48:48 2007 +0000 8.3 @@ -7,10 +7,10 @@ 8.4 #sys.path.append("/home/paulb/Software/Python/WebStack") 8.5 #sys.path.append("/home/paulb/Software/Python/WebStack/examples/Common") 8.6 8.7 -from WebStack.Adapters.WSGI import deploy 8.8 +from WebStack.Adapters.WSGI import deploy_as_cgi 8.9 from WebStack.Resources.Login import LoginResource, LoginAuthenticator 8.10 8.11 -deploy( 8.12 +deploy_as_cgi( 8.13 LoginResource( 8.14 LoginAuthenticator( 8.15 secret_key="horses",
9.1 --- a/examples/WSGI/SessionsHandler.py Thu Sep 27 22:40:25 2007 +0000 9.2 +++ b/examples/WSGI/SessionsHandler.py Thu Sep 27 22:48:48 2007 +0000 9.3 @@ -7,9 +7,9 @@ 9.4 #sys.path.append("/home/paulb/Software/Python/WebStack") 9.5 #sys.path.append("/home/paulb/Software/Python/WebStack/examples/Common") 9.6 9.7 -from WebStack.Adapters.WSGI import deploy 9.8 +from WebStack.Adapters.WSGI import deploy_as_cgi 9.9 from Sessions import SessionsResource 9.10 9.11 -deploy(SessionsResource()) 9.12 +deploy_as_cgi(SessionsResource()) 9.13 9.14 # vim: tabstop=4 expandtab shiftwidth=4
10.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 10.2 +++ b/examples/WSGI/SimpleApp.py Thu Sep 27 22:48:48 2007 +0000 10.3 @@ -0,0 +1,15 @@ 10.4 +#!/usr/bin/env python 10.5 + 10.6 +# Uncomment and adjust the paths below if WebStack is not installed somewhere 10.7 +# on the PYTHONPATH. 10.8 + 10.9 +#import sys 10.10 +#sys.path.append("/home/paulb/Software/Python/WebStack") 10.11 +#sys.path.append("/home/paulb/Software/Python/WebStack/examples/Common") 10.12 + 10.13 +from WebStack.Adapters.WSGI import deploy 10.14 +from Simple import SimpleResource 10.15 + 10.16 +deploy(SimpleResource()) 10.17 + 10.18 +# vim: tabstop=4 expandtab shiftwidth=4
11.1 --- a/examples/WSGI/SimpleHandler.py Thu Sep 27 22:40:25 2007 +0000 11.2 +++ b/examples/WSGI/SimpleHandler.py Thu Sep 27 22:48:48 2007 +0000 11.3 @@ -7,9 +7,9 @@ 11.4 #sys.path.append("/home/paulb/Software/Python/WebStack") 11.5 #sys.path.append("/home/paulb/Software/Python/WebStack/examples/Common") 11.6 11.7 -from WebStack.Adapters.WSGI import deploy 11.8 +from WebStack.Adapters.WSGI import deploy_as_cgi 11.9 from Simple import SimpleResource 11.10 11.11 -deploy(SimpleResource()) 11.12 +deploy_as_cgi(SimpleResource()) 11.13 11.14 # vim: tabstop=4 expandtab shiftwidth=4
12.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 12.2 +++ b/examples/WSGI/UnicodeApp.py Thu Sep 27 22:48:48 2007 +0000 12.3 @@ -0,0 +1,15 @@ 12.4 +#!/usr/bin/env python 12.5 + 12.6 +# Uncomment and adjust the paths below if WebStack is not installed somewhere 12.7 +# on the PYTHONPATH. 12.8 + 12.9 +#import sys 12.10 +#sys.path.append("/home/paulb/Software/Python/WebStack") 12.11 +#sys.path.append("/home/paulb/Software/Python/WebStack/examples/Common") 12.12 + 12.13 +from WebStack.Adapters.WSGI import deploy 12.14 +from Unicode import UnicodeResource 12.15 + 12.16 +deploy(UnicodeResource()) 12.17 + 12.18 +# vim: tabstop=4 expandtab shiftwidth=4
13.1 --- a/examples/WSGI/UnicodeHandler.py Thu Sep 27 22:40:25 2007 +0000 13.2 +++ b/examples/WSGI/UnicodeHandler.py Thu Sep 27 22:48:48 2007 +0000 13.3 @@ -7,9 +7,9 @@ 13.4 #sys.path.append("/home/paulb/Software/Python/WebStack") 13.5 #sys.path.append("/home/paulb/Software/Python/WebStack/examples/Common") 13.6 13.7 -from WebStack.Adapters.WSGI import deploy 13.8 +from WebStack.Adapters.WSGI import deploy_as_cgi 13.9 from Unicode import UnicodeResource 13.10 13.11 -deploy(UnicodeResource()) 13.12 +deploy_as_cgi(UnicodeResource()) 13.13 13.14 # vim: tabstop=4 expandtab shiftwidth=4
14.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 14.2 +++ b/examples/WSGI/VerySimpleApp.py Thu Sep 27 22:48:48 2007 +0000 14.3 @@ -0,0 +1,15 @@ 14.4 +#!/usr/bin/env python 14.5 + 14.6 +# Uncomment and adjust the paths below if WebStack is not installed somewhere 14.7 +# on the PYTHONPATH. 14.8 + 14.9 +#import sys 14.10 +#sys.path.append("/home/paulb/Software/Python/WebStack") 14.11 +#sys.path.append("/home/paulb/Software/Python/WebStack/examples/Common") 14.12 + 14.13 +from WebStack.Adapters.WSGI import deploy 14.14 +from VerySimple import VerySimpleResource 14.15 + 14.16 +deploy(VerySimpleResource()) 14.17 + 14.18 +# vim: tabstop=4 expandtab shiftwidth=4
15.1 --- a/examples/WSGI/VerySimpleHandler.py Thu Sep 27 22:40:25 2007 +0000 15.2 +++ b/examples/WSGI/VerySimpleHandler.py Thu Sep 27 22:48:48 2007 +0000 15.3 @@ -7,9 +7,9 @@ 15.4 #sys.path.append("/home/paulb/Software/Python/WebStack") 15.5 #sys.path.append("/home/paulb/Software/Python/WebStack/examples/Common") 15.6 15.7 -from WebStack.Adapters.WSGI import deploy 15.8 +from WebStack.Adapters.WSGI import deploy_as_cgi 15.9 from VerySimple import VerySimpleResource 15.10 15.11 -deploy(VerySimpleResource()) 15.12 +deploy_as_cgi(VerySimpleResource()) 15.13 15.14 # vim: tabstop=4 expandtab shiftwidth=4