Permalink
Browse files

add new AppEngine hotness

  • Loading branch information...
1 parent 17e91f0 commit 473e80724a3e596577d005a125070c5daafa031a @al3x committed May 20, 2008
View
@@ -0,0 +1,17 @@
+application: downforeveryoneorjustme
+version: 1
+runtime: python
+api_version: 1
+
+handlers:
+- url: /stylesheets
+ static_dir: stylesheets
+
+- url: /images
+ static_dir: images
+
+- url: /javascripts
+ static_dir: javascripts
+
+- url: .*
+ script: main.py
View
@@ -0,0 +1,11 @@
+indexes:
+
+# AUTOGENERATED
+
+# This index.yaml is automatically updated whenever the dev_appserver
+# detects that a new type of query is run. If you want to manage the
+# index.yaml file manually, remove the above marker line (the line
+# saying "# AUTOGENERATED"). If you want to manage some indexes
+# manually, move them above the marker line. The index.yaml file is
+# automatically uploaded to the admin console when you next deploy
+# your application using appcfg.py.
View
16 main.py
@@ -0,0 +1,16 @@
+#!/usr/bin/env python
+
+import web
+
+urls = (
+ '/', 'index'
+)
+
+render = web.template.render('templates/')
+
+class index:
+ def GET(self):
+ return render.index()
+
+app = web.application(urls, globals())
+main = app.cgirun()
View
@@ -0,0 +1,39 @@
+<html>
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
+ <link rel="shortcut icon" href="http://static.al3x.net/down_favicon.ico" type="image/x-icon" />
+ <!--tipjoy:al3x-->
+ <title>Down for everyone or just me?</title>
+ <style type="text/css">
+ body{background-color:#fff;color:#333;font-family:Arial,Verdana,sans-serif;font-size:62.5%;margin:10% 5% 0 5%;text-align:center;}
+ a,a:visited,a:active{color:#0080ff;text-decoration:underline;}
+ a:hover{text-decoration:none;}
+ input[type=text]{border:1px solid #ccc;color:#ccc;font-size:1em;padding:4px 6px 4px 6px;}
+ .domain{font-weight:bold;}
+ #container{clear:both;font-size:3em;margin:auto;}
+ #domain_input{width:250px;}
+ </style>
+ <script type="text/javascript">
+ function clearDomainInput(e) {
+ if (e.cleared) { return; }
+ e.cleared = true;
+ e.value = '';
+ e.style.color = '#000';
+ }
+ </script>
+ </head>
+ <body>
+ <div id="container">
+ Back soon.
+ </div>
+ <script type="text/javascript">
+ var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
+ document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
+ </script>
+ <script type="text/javascript">
+ var pageTracker = _gat._getTracker("UA-853305-3");
+ pageTracker._initData();
+ pageTracker._trackPageview();
+ </script>
+ </body>
+</html>
View
@@ -0,0 +1,65 @@
+#!/usr/bin/env python
+from __future__ import generators
+
+"""web.py: makes web apps (http://webpy.org)"""
+__version__ = "0.3"
+__revision__ = "$Rev$"
+__author__ = "Aaron Swartz <me@aaronsw.com>"
+__license__ = "public domain"
+__contributors__ = "see http://webpy.org/changes"
+
+# todo:
+# - some sort of accounts system
+
+import utils, db, net, wsgi, http, webapi, request, httpserver, debugerror
+import template, form
+
+import session
+
+from utils import *
+from db import *
+from net import *
+from wsgi import *
+from http import *
+from webapi import *
+from request import *
+from httpserver import *
+from debugerror import *
+from application import *
+
+try:
+ import cheetah
+ from cheetah import *
+except ImportError:
+ pass
+
+def main():
+ import doctest
+
+ doctest.testmod(utils)
+ doctest.testmod(db)
+ doctest.testmod(net)
+ doctest.testmod(wsgi)
+ doctest.testmod(http)
+ doctest.testmod(webapi)
+ doctest.testmod(request)
+
+ try:
+ doctest.testmod(cheetah)
+ except NameError:
+ pass
+
+ template.test()
+
+ import sys
+ urls = ('/web.py', 'source')
+ class source:
+ def GET(self):
+ header('Content-Type', 'text/python')
+ print open(sys.argv[0]).read()
+
+ if listget(sys.argv, 1) != 'test':
+ run(urls, locals())
+
+if __name__ == "__main__": main()
+
View
Binary file not shown.
Oops, something went wrong.

0 comments on commit 473e807

Please sign in to comment.