Move website/sphinx/ to docs/, remove rest of appengine website dir.
Before Width: | Height: | Size: 1022 B After Width: | Height: | Size: 1022 B |
Before Width: | Height: | Size: 6.9 KiB After Width: | Height: | Size: 6.9 KiB |
|
@ -1,24 +0,0 @@
|
|||
SPHINXOPTS=-W -d sphinx/build/doctrees sphinx
|
||||
|
||||
.PHONY: sphinx
|
||||
sphinx:
|
||||
sphinx-build -b html $(SPHINXOPTS) sphinx/build/html
|
||||
|
||||
.PHONY: coverage
|
||||
coverage:
|
||||
sphinx-build -b coverage ${SPHINXOPTS} sphinx/build/coverage
|
||||
cat sphinx/build/coverage/python.txt
|
||||
|
||||
.PHONY: latex
|
||||
latex:
|
||||
sphinx-build -b latex $(SPHINXOPTS) sphinx/build/latex
|
||||
|
||||
# Building a pdf requires a latex installation. For macports, the needed
|
||||
# packages are texlive-latex-extra and texlive-fonts-recommended.
|
||||
# The output is in sphinx/build/latex/tornado.pdf
|
||||
.PHONY: pdf
|
||||
pdf: latex
|
||||
cd sphinx/build/latex && pdflatex -interaction=nonstopmode tornado.tex
|
||||
|
||||
clean:
|
||||
rm -rf sphinx/build
|
|
@ -1,32 +0,0 @@
|
|||
application: python-tornado-hrd
|
||||
version: 3
|
||||
runtime: python27
|
||||
api_version: 1
|
||||
threadsafe: yes
|
||||
|
||||
handlers:
|
||||
- url: /static/tornado-0.1.tar.gz
|
||||
script: website.application
|
||||
|
||||
- url: /static/tornado-0.2.tar.gz
|
||||
script: website.application
|
||||
|
||||
- url: /static/
|
||||
static_dir: static
|
||||
|
||||
- url: /robots\.txt
|
||||
static_files: static/robots.txt
|
||||
upload: static/robots.txt
|
||||
|
||||
- url: /favicon\.ico
|
||||
static_files: static/favicon.ico
|
||||
upload: static/favicon.ico
|
||||
|
||||
- url: /documentation/?
|
||||
script: website.application
|
||||
|
||||
- url: /documentation
|
||||
static_dir: sphinx/build/html
|
||||
|
||||
- url: /.*
|
||||
script: website.application
|
|
@ -1,120 +0,0 @@
|
|||
body {
|
||||
background: white;
|
||||
color: black;
|
||||
font-family: Georgia, serif;
|
||||
font-size: 11pt;
|
||||
margin: 10px;
|
||||
margin-top: 15px;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4 {
|
||||
font-family: Calibri, sans-serif;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
img {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
pre,
|
||||
code {
|
||||
color: #060;
|
||||
}
|
||||
|
||||
a,
|
||||
a code {
|
||||
color: #216093;
|
||||
}
|
||||
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
td {
|
||||
border: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#body {
|
||||
margin: auto;
|
||||
max-width: 850px;
|
||||
}
|
||||
|
||||
#header {
|
||||
margin-bottom: 15px;
|
||||
margin-right: 30px;
|
||||
}
|
||||
|
||||
#content,
|
||||
#footer {
|
||||
margin-left: 31px;
|
||||
margin-right: 31px;
|
||||
}
|
||||
|
||||
#content p,
|
||||
#content li,
|
||||
#footer {
|
||||
line-height: 16pt;
|
||||
}
|
||||
|
||||
#content pre {
|
||||
line-height: 14pt;
|
||||
margin: 17pt;
|
||||
padding-left: 1em;
|
||||
border-left: 1px solid #ccc;
|
||||
}
|
||||
|
||||
#footer {
|
||||
margin-top: 5em;
|
||||
}
|
||||
|
||||
#header .logo {
|
||||
line-height: 0;
|
||||
padding-bottom: 5px;
|
||||
padding-right: 15px;
|
||||
}
|
||||
|
||||
#header .logo img {
|
||||
width: 286px;
|
||||
height: 72px;
|
||||
}
|
||||
|
||||
#header .title {
|
||||
vertical-align: bottom;
|
||||
}
|
||||
|
||||
#header .title h1 {
|
||||
font-size: 35px;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
#header .title h1,
|
||||
#header .title h1 a {
|
||||
color: #666;
|
||||
}
|
||||
|
||||
#content h1,
|
||||
#content h2,
|
||||
#content h3 {
|
||||
color: #4d8cbf;
|
||||
margin-bottom: 2pt;
|
||||
margin-top: 17pt;
|
||||
}
|
||||
|
||||
#content h2 {
|
||||
font-size: 19pt;
|
||||
}
|
||||
|
||||
#content h3 {
|
||||
font-size: 15pt;
|
||||
}
|
||||
|
||||
#content p {
|
||||
margin: 0;
|
||||
margin-bottom: 1em;
|
||||
}
|
Before Width: | Height: | Size: 7.3 KiB |
Before Width: | Height: | Size: 1022 B |
Before Width: | Height: | Size: 7.7 KiB |
|
@ -1,2 +0,0 @@
|
|||
User-Agent: *
|
||||
Disallow:
|
|
@ -1,67 +0,0 @@
|
|||
@import url("default.css");
|
||||
|
||||
/* These style tweaks are probably going to turn out to be a little fragile.
|
||||
They're currently based on the default theme from sphinx 1.0.7.
|
||||
*/
|
||||
|
||||
div.body h1,
|
||||
div.body h2,
|
||||
div.body h3,
|
||||
div.body h4,
|
||||
div.body h5,
|
||||
div.body h6,
|
||||
div.sphinxsidebar h3,
|
||||
div.sphinxsidebar h4 {
|
||||
font-weight: bold;
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
pre {
|
||||
line-height: 14pt;
|
||||
margin: 17pt;
|
||||
padding-left: 1em;
|
||||
border: none;
|
||||
border-left: 1px solid #ccc;
|
||||
}
|
||||
|
||||
div.body p, div.body dd, div.body li {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.highlight {
|
||||
background: #fff !important;
|
||||
}
|
||||
|
||||
th.field-name {
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
tt {
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
/* "related" = top header */
|
||||
div.related {
|
||||
position: fixed;
|
||||
}
|
||||
|
||||
/* body settings copied from div.sphinxsidebar so following a link to a
|
||||
specific object positions that object below the fixed header */
|
||||
div.body {
|
||||
top: 30px;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
left: 230px;
|
||||
margin: 0;
|
||||
position: fixed;
|
||||
overflow: auto;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
div.related, div.sphinxsidebar {
|
||||
font-family: Calibri, sans-serif;
|
||||
}
|
||||
|
||||
div.section {
|
||||
max-width: 850px;
|
||||
}
|
Before Width: | Height: | Size: 6.9 KiB |
Before Width: | Height: | Size: 7.0 KiB |
|
@ -1,28 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<title>{% block title %}Tornado Web Server{% end %}</title>
|
||||
<link rel="shortcut icon" href="/static/favicon.ico" type="image/x-icon" />
|
||||
<link rel="stylesheet" href="/static/base.css" type="text/css"/>
|
||||
{% block head %}{% end %}
|
||||
</head>
|
||||
<body>
|
||||
<div id="body">
|
||||
<div id="header">
|
||||
<table>
|
||||
<tr>
|
||||
<td class="logo"><a href="/"><img src="/static/tornado.png" alt="Tornado"/></a></td>
|
||||
<td class="title">{% block headertitle %}{% end %}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div id="content">{% block body %}{% end %}</div>
|
||||
<div id="footer">
|
||||
<div>Tornado is one of <a href="http://developers.facebook.com/opensource/">Facebook's open source technologies</a>. It is available under the <a href="http://www.apache.org/licenses/LICENSE-2.0.html">Apache Licence, Version 2.0</a>.</div>
|
||||
<div>This web site and all documentation is licensed under <a href="http://creativecommons.org/licenses/by/3.0/">Creative Commons 3.0</a>.</div>
|
||||
</div>
|
||||
</div>
|
||||
{% block bottom %}{% end %}
|
||||
</body>
|
||||
</html>
|
|
@ -1,67 +0,0 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block body %}
|
||||
<p><a href="http://www.tornadoweb.org/">Tornado</a> is an open source version of the scalable, non-blocking web server and tools that power <a href="http://friendfeed.com/">FriendFeed</a>. The FriendFeed application is written using a web framework that looks a bit like <a href="http://webpy.org/">web.py</a> or <a href="http://code.google.com/appengine/docs/python/tools/webapp/">Google's webapp</a>, but with additional tools and optimizations to take advantage of the underlying non-blocking infrastructure.</p>
|
||||
<p>The framework is distinct from most mainstream web server frameworks (and certainly most Python frameworks) because it is non-blocking and reasonably fast. Because it is non-blocking and uses <a href="http://www.kernel.org/doc/man-pages/online/pages/man4/epoll.4.html"><code>epoll</code></a> or <code>kqueue</code>, it can handle thousands of simultaneous standing connections, which means it is ideal for real-time web services. We built the web server specifically to handle FriendFeed's real-time features — every active user of FriendFeed maintains an open connection to the FriendFeed servers. (For more information on scaling servers to support thousands of clients, see The <a href="http://www.kegel.com/c10k.html">C10K problem</a>.)</p>
|
||||
|
||||
<h2>Upgrading from Tornado 1.x</h2>
|
||||
|
||||
<p>Tornado 2.0 introduces several potentially backwards-incompatible changes,
|
||||
including in particular automatic escaping of template output. Users
|
||||
who are upgrading from Tornado 1.x should see the
|
||||
<a href="/documentation/releases/v2.0.0.html">release notes</a> for
|
||||
information about backwards compatibility.</p>
|
||||
|
||||
<h2>Quick links</h2>
|
||||
|
||||
<ul>
|
||||
<li><a href="/documentation/index.html">Documentation</a></li>
|
||||
<li><a href="https://github.com/downloads/facebook/tornado/tornado-{{version}}.tar.gz">Download version {{version}}</a> (<a href="/documentation/releases.html">release notes</a>)</li>
|
||||
<li><a href="https://github.com/facebook/tornado">Source (github)</a></li>
|
||||
<li><a href="http://groups.google.com/group/python-tornado">Mailing list</a></li>
|
||||
<li><a href="https://github.com/facebook/tornado/wiki/Links">Wiki</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>Hello, world</h2>
|
||||
<p>Here is the canonical "Hello, world" example app for Tornado:</p>
|
||||
<pre><code>import tornado.ioloop
|
||||
import tornado.web
|
||||
|
||||
class MainHandler(tornado.web.RequestHandler):
|
||||
def get(self):
|
||||
self.write("Hello, world")
|
||||
|
||||
application = tornado.web.Application([
|
||||
(r"/", MainHandler),
|
||||
])
|
||||
|
||||
if __name__ == "__main__":
|
||||
application.listen(8888)
|
||||
tornado.ioloop.IOLoop.instance().start()</code></pre>
|
||||
<p>See the <a href="/documentation/index.html">Tornado documentation</a> for a detailed walkthrough of the framework.</p>
|
||||
|
||||
<h2>Installation</h2>
|
||||
|
||||
<p><b>Automatic installation:</b> Tornado is listed in <a href="http://pypi.python.org/pypi/tornado">PyPI</a> and can be installed with <code>pip</code> or <code>easy_install</code>. Note that the source distribution includes demo applications that are not present when Tornado is installed in this way, so you may wish to download a copy of the source tarball as well.</p>
|
||||
|
||||
<p><b>Manual installation:</b> Download <a href="https://github.com/downloads/facebook/tornado/tornado-{{version}}.tar.gz">tornado-{{version}}.tar.gz</a></p>
|
||||
<pre><code>tar xvzf tornado-{{version}}.tar.gz
|
||||
cd tornado-{{version}}
|
||||
python setup.py build
|
||||
sudo python setup.py install</code></pre>
|
||||
<p>The Tornado source code is <a href="https://github.com/facebook/tornado">hosted on GitHub</a>. It is also possible to simply add the tornado directory to your <code>PYTHONPATH</code> instead of building with <code>setup.py</code>.
|
||||
|
||||
<p><b>Prerequisites:</b> Tornado runs on Python 2.6+ and 3.2+. Both CPython and PyPy are supported. There are no required dependencies outside the Python standard library, although unittest2 is required to run Tornado's unittest suite on Python 2.6. Certain optional features require additional third-party modules:
|
||||
<ul>
|
||||
<li>tornado.curl_httpclient needs <a href="http://pycurl.sourceforge.net/">PycURL</a> (version 7.18.2 or higher required; version 7.21.1 or higher recommended)</li>
|
||||
<li>Multithreading support requires the concurrent.futures module, which is in the standard library for Python 3.2+ and available <a href="http://pypi.python.org/pypi/futures">on pypi</a> for older versions.</li>
|
||||
</ul></p>
|
||||
|
||||
<p><b>Platforms:</b> Tornado should run on any Unix-like platform, although
|
||||
for the best performance and scalability only Linux and BSD (including
|
||||
BSD derivatives like Mac OS X) are recommended.</p>
|
||||
|
||||
<h2>Discussion and support</h2>
|
||||
<p>You can discuss Tornado and report bugs on <a href="http://groups.google.com/group/python-tornado">the Tornado developer mailing list</a>. Links to additional resources can be found on the <a href="https://github.com/facebook/tornado/wiki/Links">Tornado wiki</a>.
|
||||
|
||||
{% end %}
|
|
@ -1 +0,0 @@
|
|||
../tornado
|
|
@ -1,47 +0,0 @@
|
|||
#!/usr/bin/env python
|
||||
#
|
||||
# Copyright 2009 Bret Taylor
|
||||
#
|
||||
# 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 os
|
||||
import os.path
|
||||
import tornado.web
|
||||
import tornado.wsgi
|
||||
|
||||
|
||||
class ContentHandler(tornado.web.RequestHandler):
|
||||
def get(self, path="index"):
|
||||
paths = ("index",)
|
||||
if path not in paths:
|
||||
raise tornado.web.HTTPError(404)
|
||||
self.render(path + ".html", version=tornado.version)
|
||||
|
||||
|
||||
settings = {
|
||||
"template_path": os.path.join(os.path.dirname(__file__), "templates"),
|
||||
"xsrf_cookies": True,
|
||||
"debug": os.environ.get("SERVER_SOFTWARE", "").startswith("Development/"),
|
||||
}
|
||||
application = tornado.wsgi.WSGIApplication([
|
||||
(r"/", ContentHandler),
|
||||
(r"/(index)", ContentHandler),
|
||||
(r"/static/tornado-0.1.tar.gz", tornado.web.RedirectHandler,
|
||||
dict(url="https://github.com/downloads/facebook/tornado/tornado-0.1.tar.gz")),
|
||||
(r"/static/tornado-0.2.tar.gz", tornado.web.RedirectHandler,
|
||||
dict(url="https://github.com/downloads/facebook/tornado/tornado-0.2.tar.gz")),
|
||||
|
||||
(r"/documentation/?", tornado.web.RedirectHandler,
|
||||
dict(url="/documentation/index.html")),
|
||||
|
||||
], **settings)
|