Permalink
Browse files

cleaning up vendor

  • Loading branch information...
1 parent 67f50de commit 842459e6b7371a7051e8ef196772bfe7a6a10158 @thruflo committed Dec 26, 2009
Showing with 1 addition and 15,737 deletions.
  1. +1 −0 vendor/tornado-git
  2. +0 −4 vendor/tornado-git/.gitignore
  3. +0 −2 vendor/tornado-git/MANIFEST.in
  4. +0 −27 vendor/tornado-git/README
  5. +0 −48 vendor/tornado-git/demos/appengine/README
  6. +0 −11 vendor/tornado-git/demos/appengine/app.yaml
  7. +0 −169 vendor/tornado-git/demos/appengine/blog.py
  8. +0 −1,877 vendor/tornado-git/demos/appengine/markdown.py
  9. +0 −153 vendor/tornado-git/demos/appengine/static/blog.css
  10. +0 −31 vendor/tornado-git/demos/appengine/templates/archive.html
  11. +0 −29 vendor/tornado-git/demos/appengine/templates/base.html
  12. +0 −42 vendor/tornado-git/demos/appengine/templates/compose.html
  13. +0 −5 vendor/tornado-git/demos/appengine/templates/entry.html
  14. +0 −26 vendor/tornado-git/demos/appengine/templates/feed.xml
  15. +0 −8 vendor/tornado-git/demos/appengine/templates/home.html
  16. +0 −8 vendor/tornado-git/demos/appengine/templates/modules/entry.html
  17. +0 −79 vendor/tornado-git/demos/auth/authdemo.py
  18. +0 −57 vendor/tornado-git/demos/blog/README
  19. +0 −195 vendor/tornado-git/demos/blog/blog.py
  20. +0 −1,877 vendor/tornado-git/demos/blog/markdown.py
  21. +0 −44 vendor/tornado-git/demos/blog/schema.sql
  22. +0 −153 vendor/tornado-git/demos/blog/static/blog.css
  23. +0 −31 vendor/tornado-git/demos/blog/templates/archive.html
  24. +0 −27 vendor/tornado-git/demos/blog/templates/base.html
  25. +0 −42 vendor/tornado-git/demos/blog/templates/compose.html
  26. +0 −5 vendor/tornado-git/demos/blog/templates/entry.html
  27. +0 −26 vendor/tornado-git/demos/blog/templates/feed.xml
  28. +0 −8 vendor/tornado-git/demos/blog/templates/home.html
  29. +0 −8 vendor/tornado-git/demos/blog/templates/modules/entry.html
  30. +0 −156 vendor/tornado-git/demos/chat/chatdemo.py
  31. +0 −56 vendor/tornado-git/demos/chat/static/chat.css
  32. +0 −135 vendor/tornado-git/demos/chat/static/chat.js
  33. +0 −37 vendor/tornado-git/demos/chat/templates/index.html
  34. +0 −1 vendor/tornado-git/demos/chat/templates/message.html
  35. +0 −8 vendor/tornado-git/demos/facebook/README
  36. +0 −127 vendor/tornado-git/demos/facebook/facebook.py
  37. +0 −97 vendor/tornado-git/demos/facebook/static/facebook.css
  38. 0 vendor/tornado-git/demos/facebook/static/facebook.js
  39. +0 −29 vendor/tornado-git/demos/facebook/templates/modules/post.html
  40. +0 −22 vendor/tornado-git/demos/facebook/templates/stream.html
  41. +0 −22 vendor/tornado-git/demos/facebook/uimodules.py
  42. +0 −43 vendor/tornado-git/demos/helloworld/helloworld.py
  43. +0 −38 vendor/tornado-git/setup.py
  44. +0 −17 vendor/tornado-git/tornado/__init__.py
  45. +0 −882 vendor/tornado-git/tornado/auth.py
  46. +0 −64 vendor/tornado-git/tornado/autoreload.py
  47. +0 −179 vendor/tornado-git/tornado/database.py
  48. +0 −112 vendor/tornado-git/tornado/epoll.c
  49. +0 −112 vendor/tornado-git/tornado/escape.py
  50. +0 −428 vendor/tornado-git/tornado/httpclient.py
  51. +0 −434 vendor/tornado-git/tornado/httpserver.py
  52. +0 −370 vendor/tornado-git/tornado/ioloop.py
  53. +0 −228 vendor/tornado-git/tornado/iostream.py
  54. +0 −395 vendor/tornado-git/tornado/locale.py
  55. +0 −350 vendor/tornado-git/tornado/options.py
  56. +0 −255 vendor/tornado-git/tornado/s3server.py
  57. +0 −561 vendor/tornado-git/tornado/template.py
  58. +0 −1,282 vendor/tornado-git/tornado/web.py
  59. +0 −298 vendor/tornado-git/tornado/wsgi.py
  60. +0 −15 vendor/tornado-git/website/app.yaml
  61. 0 vendor/tornado-git/website/index.yaml
  62. +0 −603 vendor/tornado-git/website/markdown/__init__.py
  63. +0 −95 vendor/tornado-git/website/markdown/blockparser.py
  64. +0 −460 vendor/tornado-git/website/markdown/blockprocessors.py
  65. +0 −96 vendor/tornado-git/website/markdown/commandline.py
  66. +0 −33 vendor/tornado-git/website/markdown/etree_loader.py
  67. 0 vendor/tornado-git/website/markdown/extensions/__init__.py
  68. +0 −140 vendor/tornado-git/website/markdown/extensions/toc.py
  69. +0 −274 vendor/tornado-git/website/markdown/html4.py
  70. +0 −371 vendor/tornado-git/website/markdown/inlinepatterns.py
  71. +0 −162 vendor/tornado-git/website/markdown/odict.py
  72. +0 −77 vendor/tornado-git/website/markdown/postprocessors.py
  73. +0 −214 vendor/tornado-git/website/markdown/preprocessors.py
  74. +0 −329 vendor/tornado-git/website/markdown/treeprocessors.py
  75. +0 −120 vendor/tornado-git/website/static/base.css
  76. BIN vendor/tornado-git/website/static/facebook.png
  77. BIN vendor/tornado-git/website/static/friendfeed.png
  78. +0 −2 vendor/tornado-git/website/static/robots.txt
  79. BIN vendor/tornado-git/website/static/tornado-0.1.tar.gz
  80. BIN vendor/tornado-git/website/static/tornado-0.2.tar.gz
  81. BIN vendor/tornado-git/website/static/tornado.png
  82. BIN vendor/tornado-git/website/static/twitter.png
  83. +0 −27 vendor/tornado-git/website/templates/base.html
  84. +0 −9 vendor/tornado-git/website/templates/documentation.html
  85. +0 −866 vendor/tornado-git/website/templates/documentation.txt
  86. +0 −51 vendor/tornado-git/website/templates/index.html
  87. +0 −63 vendor/tornado-git/website/website.py
Submodule tornado-git added at b3d98c
@@ -1,4 +0,0 @@
-*.pyc
-*.so
-*~
-build
@@ -1,2 +0,0 @@
-recursive-include demos *.py *.yaml *.html *.css *.png *.js *.xml *.sql README
-include tornado/epoll.c
@@ -1,27 +0,0 @@
-Tornado
-=======
-Tornado is an open source version of the scalable, non-blocking web server
-and and tools that power FriendFeed. Documentation and downloads are
-available at http://www.tornadoweb.org/
-
-Tornado is licensed under the Apache Licence, Version 2.0
-(http://www.apache.org/licenses/LICENSE-2.0.html).
-
-Installation
-============
-To install:
-
- python setup.py build
- sudo python setup.py install
-
-Tornado has been tested on Python 2.5 and 2.6. To use all of the features
-of Tornado, you need to have PycURL and a JSON library like simplejson
-installed.
-
-On Mac OS X, you can install the packages with:
-
- sudo easy_install setuptools pycurl==7.16.2.1 simplejson
-
-On Ubuntu Linux, you can install the packages with:
-
- sudo apt-get install python-pycurl python-simplejson
@@ -1,48 +0,0 @@
-Running the Tornado AppEngine example
-=====================================
-This example is designed to run in Google AppEngine, so there are a couple
-of steps to get it running. You can download the Google AppEngine Python
-development environment at http://code.google.com/appengine/downloads.html.
-
-1. Link or copy the tornado code directory into this directory:
-
- ln -s ../../tornado tornado
-
- AppEngine doesn't use the Python modules installed on this machine.
- You need to have the 'tornado' module copied or linked for AppEngine
- to find it.
-
-3. Install and run dev_appserver
-
- If you don't already have the App Engine SDK, download it from
- http://code.google.com/appengine/downloads.html
-
- To start the tornado demo, run the dev server on this directory:
-
- dev_appserver.py .
-
-4. Visit http://localhost:8080/ in your browser
-
- If you sign in as an administrator, you will be able to create and
- edit blog posts. If you sign in as anybody else, you will only see
- the existing blog posts.
-
-
-If you want to deploy the blog in production:
-
-1. Register a new appengine application and put its id in app.yaml
-
- First register a new application at http://appengine.google.com/.
- Then edit app.yaml in this directory and change the "application"
- setting from "tornado-appenginge" to your new application id.
-
-2. Deploy to App Engine
-
- If you registered an application id, you can now upload your new
- Tornado blog by running this command:
-
- appcfg update .
-
- After that, visit application_id.appspot.com, where application_id
- is the application you registered.
-
@@ -1,11 +0,0 @@
-application: tornado-appengine
-version: 1
-runtime: python
-api_version: 1
-
-handlers:
-- url: /static/
- static_dir: static
-
-- url: /.*
- script: blog.py
@@ -1,169 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2009 Facebook
-#
-# Licensed under the Apache License, Version 2.0 (the "License"); you may
-# not use this file except in compliance with the License. You may obtain
-# a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-# License for the specific language governing permissions and limitations
-# under the License.
-
-import functools
-import markdown
-import os.path
-import re
-import tornado.web
-import tornado.wsgi
-import unicodedata
-import wsgiref.handlers
-
-from google.appengine.api import users
-from google.appengine.ext import db
-
-
-class Entry(db.Model):
- """A single blog entry."""
- author = db.UserProperty()
- title = db.StringProperty(required=True)
- slug = db.StringProperty(required=True)
- markdown = db.TextProperty(required=True)
- html = db.TextProperty(required=True)
- published = db.DateTimeProperty(auto_now_add=True)
- updated = db.DateTimeProperty(auto_now=True)
-
-
-def administrator(method):
- """Decorate with this method to restrict to site admins."""
- @functools.wraps(method)
- def wrapper(self, *args, **kwargs):
- if not self.current_user:
- if self.request.method == "GET":
- self.redirect(self.get_login_url())
- return
- raise tornado.web.HTTPError(403)
- elif not self.current_user.administrator:
- if self.request.method == "GET":
- self.redirect("/")
- return
- raise tornado.web.HTTPError(403)
- else:
- return method(self, *args, **kwargs)
- return wrapper
-
-
-class BaseHandler(tornado.web.RequestHandler):
- """Implements Google Accounts authentication methods."""
- def get_current_user(self):
- user = users.get_current_user()
- if user: user.administrator = users.is_current_user_admin()
- return user
-
- def get_login_url(self):
- return users.create_login_url(self.request.uri)
-
- def render_string(self, template_name, **kwargs):
- # Let the templates access the users module to generate login URLs
- return tornado.web.RequestHandler.render_string(
- self, template_name, users=users, **kwargs)
-
-
-class HomeHandler(BaseHandler):
- def get(self):
- entries = db.Query(Entry).order('-published').fetch(limit=5)
- if not entries:
- if not self.current_user or self.current_user.administrator:
- self.redirect("/compose")
- return
- self.render("home.html", entries=entries)
-
-
-class EntryHandler(BaseHandler):
- def get(self, slug):
- entry = db.Query(Entry).filter("slug =", slug).get()
- if not entry: raise tornado.web.HTTPError(404)
- self.render("entry.html", entry=entry)
-
-
-class ArchiveHandler(BaseHandler):
- def get(self):
- entries = db.Query(Entry).order('-published')
- self.render("archive.html", entries=entries)
-
-
-class FeedHandler(BaseHandler):
- def get(self):
- entries = db.Query(Entry).order('-published').fetch(limit=10)
- self.set_header("Content-Type", "application/atom+xml")
- self.render("feed.xml", entries=entries)
-
-
-class ComposeHandler(BaseHandler):
- @administrator
- def get(self):
- key = self.get_argument("key", None)
- entry = Entry.get(key) if key else None
- self.render("compose.html", entry=entry)
-
- @administrator
- def post(self):
- key = self.get_argument("key", None)
- if key:
- entry = Entry.get(key)
- entry.title = self.get_argument("title")
- entry.markdown = self.get_argument("markdown")
- entry.html = markdown.markdown(self.get_argument("markdown"))
- else:
- title = self.get_argument("title")
- slug = unicodedata.normalize("NFKD", title).encode(
- "ascii", "ignore")
- slug = re.sub(r"[^\w]+", " ", slug)
- slug = "-".join(slug.lower().strip().split())
- if not slug: slug = "entry"
- while True:
- existing = db.Query(Entry).filter("slug =", slug).get()
- if not existing or str(existing.key()) == key:
- break
- slug += "-2"
- entry = Entry(
- author=self.current_user,
- title=title,
- slug=slug,
- markdown=self.get_argument("markdown"),
- html=markdown.markdown(self.get_argument("markdown")),
- )
- entry.put()
- self.redirect("/entry/" + entry.slug)
-
-
-class EntryModule(tornado.web.UIModule):
- def render(self, entry):
- return self.render_string("modules/entry.html", entry=entry)
-
-
-settings = {
- "blog_title": u"Tornado Blog",
- "template_path": os.path.join(os.path.dirname(__file__), "templates"),
- "ui_modules": {"Entry": EntryModule},
- "xsrf_cookies": True,
-}
-application = tornado.wsgi.WSGIApplication([
- (r"/", HomeHandler),
- (r"/archive", ArchiveHandler),
- (r"/feed", FeedHandler),
- (r"/entry/([^/]+)", EntryHandler),
- (r"/compose", ComposeHandler),
-], **settings)
-
-
-def main():
- wsgiref.handlers.CGIHandler().run(application)
-
-
-if __name__ == "__main__":
- main()
Oops, something went wrong.

0 comments on commit 842459e

Please sign in to comment.