Permalink
Browse files

Added docs, fixed some bugs I introduced last commit

  • Loading branch information...
1 parent 7d6b8e9 commit 3d719f35f5c1ee4ce3dc01fb2167ef49c0180cf6 @mitsuhiko mitsuhiko committed Apr 10, 2010
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -0,0 +1,7 @@
+<h3>About Flask</h3>
+<p>
+ Flask is a micro webdevelopment framework for Python. You are currently
+ looking at the documentation of the development version. Things are
+ not stable yet, but if you have some feedback,
+ <a href="mailto:armin.ronacher@active-4.com">let me know</a>.
+</p>
@@ -0,0 +1,3 @@
+<p class="logo"><a href="{{ pathto(master_doc) }}">
+ <img class="logo" src="{{ pathto('_static/flask.png', 1) }}" alt="Logo"/>
+</a></p>
@@ -0,0 +1,239 @@
+/*
+ * flasky.css_t
+ * ~~~~~~~~~~~~
+ *
+ * Sphinx stylesheet -- flasky theme based on nature theme.
+ *
+ * :copyright: Copyright 2007-2010 by the Sphinx team, see AUTHORS.
+ * :license: BSD, see LICENSE for details.
+ *
+ */
+
+@import url("basic.css");
+
+/* -- page layout ----------------------------------------------------------- */
+
+body {
+ font-family: 'Georgia', serif;
+ font-size: 100%;
+ background-color: #111;
+ color: #555;
+ margin: 0;
+ padding: 0;
+}
+
+div.documentwrapper {
+ float: left;
+ width: 100%;
+}
+
+div.bodywrapper {
+ margin: 0 0 0 230px;
+}
+
+hr {
+ border: 1px solid #B1B4B6;
+}
+
+div.document {
+ background-color: #eee;
+}
+
+div.body {
+ background-color: #ffffff;
+ color: #3E4349;
+ padding: 0 30px 30px 30px;
+ font-size: 0.9em;
+}
+
+div.footer {
+ color: #555;
+ width: 100%;
+ padding: 13px 0;
+ text-align: center;
+ font-size: 75%;
+}
+
+div.footer a {
+ color: #444;
+ text-decoration: underline;
+}
+
+div.related {
+ background-color: #774117;
+ line-height: 32px;
+ color: #fff;
+ text-shadow: 0px 1px 0 #444;
+ font-size: 0.9em;
+}
+
+div.related a {
+ color: #E9D1C1;
+}
+
+div.sphinxsidebar {
+ font-size: 0.75em;
+ line-height: 1.5em;
+}
+
+div.sphinxsidebarwrapper {
+ padding: 20px 0 20px 0;
+}
+
+div.sphinxsidebarwrapper p.logo {
+ padding: 0 0 10px 0;
+ margin: 0;
+ text-align: center;
+}
+
+div.sphinxsidebar h3,
+div.sphinxsidebar h4 {
+ font-family: 'Georgia', serif;
+ color: #222;
+ font-size: 1.2em;
+ font-weight: normal;
+ margin: 0;
+ padding: 5px 10px;
+ background-color: #ddd;
+ text-shadow: 1px 1px 0 white
+}
+
+div.sphinxsidebar h4{
+ font-size: 1.1em;
+}
+
+div.sphinxsidebar h3 a {
+ color: #444;
+}
+
+
+div.sphinxsidebar p {
+ color: #555;
+ padding: 5px 20px;
+}
+
+div.sphinxsidebar p.topless {
+}
+
+div.sphinxsidebar ul {
+ margin: 10px 20px;
+ padding: 0;
+ color: #000;
+}
+
+div.sphinxsidebar a {
+ color: #444;
+}
+
+div.sphinxsidebar input {
+ border: 1px solid #ccc;
+ font-family: 'Georgia', serif;
+ font-size: 1em;
+}
+
+div.sphinxsidebar input[type=text]{
+ margin-left: 20px;
+}
+
+/* -- body styles ----------------------------------------------------------- */
+
+a {
+ color: #003B55;
+ text-decoration: none;
+}
+
+a:hover {
+ color: #6D4100;
+ text-decoration: underline;
+}
+
+div.body h1,
+div.body h2,
+div.body h3,
+div.body h4,
+div.body h5,
+div.body h6 {
+ font-family: 'Georiga', serif;
+ background-color: #bbb;
+ font-weight: normal;
+ color: #212224;
+ margin: 30px 0px 10px 0px;
+ padding: 8px 0 5px 10px;
+ text-shadow: 0px 1px 0 white
+}
+
+div.body h1 { border-top: 20px solid white; margin-top: 0; font-size: 200%; }
+div.body h2 { font-size: 150%; background-color: #ddd; }
+div.body h3 { font-size: 120%; background-color: #eee; }
+div.body h4 { font-size: 110%; background-color: #eee; }
+div.body h5 { font-size: 100%; background-color: #eee; }
+div.body h6 { font-size: 100%; background-color: #eee; }
+
+a.headerlink {
+ color: #c60f0f;
+ padding: 0 4px;
+ text-decoration: none;
+}
+
+a.headerlink:hover {
+ background-color: #c60f0f;
+ color: white;
+}
+
+div.body p, div.body dd, div.body li {
+ line-height: 1.5em;
+}
+
+div.admonition p.admonition-title + p {
+ display: inline;
+}
+
+div.highlight{
+ background-color: white;
+}
+
+div.note {
+ background-color: #eee;
+ border: 1px solid #ccc;
+}
+
+div.seealso {
+ background-color: #ffc;
+ border: 1px solid #ff6;
+}
+
+div.topic {
+ background-color: #eee;
+}
+
+div.warning {
+ background-color: #ffe4e4;
+ border: 1px solid #f66;
+}
+
+p.admonition-title {
+ display: inline;
+}
+
+p.admonition-title:after {
+ content: ":";
+}
+
+pre {
+ padding: 10px;
+ color: #222;
+ line-height: 1.2em;
+ border: 1px solid #C6C9CB;
+ font-size: 1.1em;
+ margin: 1.5em 0 1.5em 0;
+ -webkit-box-shadow: 1px 1px 1px #d8d8d8;
+ -moz-box-shadow: 1px 1px 1px #d8d8d8;
+}
+
+tt {
+ background-color: #ecf0f3;
+ color: #222;
+ /* padding: 1px 2px; */
+ font-size: 1.1em;
+ font-family: monospace;
+}
@@ -0,0 +1,3 @@
+[theme]
+inherit = basic
+stylesheet = flasky.css
View
@@ -0,0 +1,54 @@
+.. _becomingbig:
+
+Becoming Big
+============
+
+Your application is becoming more and more complex? Flask is really not
+designed for large scale applications and does not attempt to do so, but
+that does not mean you picked the wrong tool in the first place.
+
+Flask is powered by Werkzeug and Jinja2, two libraries that are in use at
+a number of large websites out there and all Flask does is bringing those
+two together. Being a microframework, Flask is literally a single file.
+What that means for large applications is that it's probably a good idea
+to take the code from Flask and put it into a new module within the
+applications and expanding on that.
+
+What Could Be Improved?
+-----------------------
+
+For instance it makes a lot of sense to change the way endpoints (the
+names of the functions / URL rules) are handled to also take the module
+name into account. Right now the function name is the URL name, but
+imagine you have a large applications consisting of multiple components.
+In that case, it makes a lot of sense to use dotted names for the URL
+endpoints.
+
+Here some suggestions how Flask can be modified to better accomodate large
+scale applications:
+
+- implement dotted names for URL endpoints
+- get rid of the decorator function registering which causes a lot
+ of troubles for applications that have circular dependencies. It
+ also requires that the whole application is imported when the system
+ initializes or certain URLs will not be available right away.
+- switch to explicit request object passing. This makes it more to type
+ (because you now have something to pass around) but it makes it a
+ whole lot easier to debug hairy situations and to test the code.
+- integrate the `Babel`_ i18n package or `SQLAlchemy`_ directl into the
+ core framework.
+
+.. _Babel: http://babel.edgewall.org/
+.. _SQLAlchemy: http://www.sqlalchemy.org/
+
+Why does not Flask do all that by Default?
+------------------------------------------
+
+There is a huge difference between a small application that only has to
+handle a couple of requests per second and with an overall code complexity
+of less than 4000 lines of code or something of larger scale. At one
+point it becomes important to integrate external systems, different
+storage backends and more.
+
+If Flask was designed with all these contingencies in mind, it would be a
+much more complex framework and less easy to get started with.
View
@@ -16,7 +16,7 @@
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
-#sys.path.append(os.path.abspath('.'))
+sys.path.append(os.path.abspath('.'))
# -- General configuration -----------------------------------------------------
@@ -80,7 +80,7 @@
#show_authors = False
# The name of the Pygments (syntax highlighting) style to use.
-pygments_style = 'sphinx'
+pygments_style = 'flaskext.FlaskyStyle'
# A list of ignored prefixes for module index sorting.
#modindex_common_prefix = []
@@ -90,15 +90,15 @@
# The theme to use for HTML and HTML Help pages. Major themes that come with
# Sphinx are currently 'default' and 'sphinxdoc'.
-html_theme = 'nature'
+html_theme = 'flasky'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#html_theme_options = {}
# Add any paths that contain custom themes here, relative to this directory.
-#html_theme_path = []
+html_theme_path = ['_themes']
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
@@ -108,7 +108,7 @@
#html_short_title = None
# The name of an image file (relative to this directory) to place at the top
-# of the sidebar.
+# of the sidebar. Do not set, template magic!
#html_logo = None
# The name of an image file (within the static path) to use as favicon of the
@@ -130,7 +130,11 @@
#html_use_smartypants = True
# Custom sidebar templates, maps document names to template names.
-#html_sidebars = {}
+html_sidebars = {
+ 'index': ['sidebarintro.html', 'sourcelink.html', 'searchbox.html'],
+ '**': ['sidebarlogo.html', 'localtoc.html', 'relations.html',
+ 'sourcelink.html', 'searchbox.html']
+}
# Additional templates that should be rendered to pages, maps page names to
# template names.
Oops, something went wrong.

0 comments on commit 3d719f3

Please sign in to comment.