diff --git a/artwork/logo-full.svg b/artwork/logo-full.svg new file mode 100755 index 00000000..43465a4d --- /dev/null +++ b/artwork/logo-full.svg @@ -0,0 +1,329 @@ + + + + diff --git a/docs/_static/flask.png b/docs/_static/flask.png new file mode 100644 index 00000000..5c603cc2 Binary files /dev/null and b/docs/_static/flask.png differ diff --git a/docs/_static/logo-full.png b/docs/_static/logo-full.png new file mode 100644 index 00000000..f255eece Binary files /dev/null and b/docs/_static/logo-full.png differ diff --git a/docs/_templates/sidebarintro.html b/docs/_templates/sidebarintro.html new file mode 100644 index 00000000..46e01d5c --- /dev/null +++ b/docs/_templates/sidebarintro.html @@ -0,0 +1,7 @@ +
+ 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, + let me know. +
diff --git a/docs/_templates/sidebarlogo.html b/docs/_templates/sidebarlogo.html new file mode 100644 index 00000000..3bc7f762 --- /dev/null +++ b/docs/_templates/sidebarlogo.html @@ -0,0 +1,3 @@ + diff --git a/docs/_themes/flasky/static/flasky.css_t b/docs/_themes/flasky/static/flasky.css_t new file mode 100644 index 00000000..05caf2f7 --- /dev/null +++ b/docs/_themes/flasky/static/flasky.css_t @@ -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; +} diff --git a/docs/_themes/flasky/theme.conf b/docs/_themes/flasky/theme.conf new file mode 100644 index 00000000..cb9eb465 --- /dev/null +++ b/docs/_themes/flasky/theme.conf @@ -0,0 +1,3 @@ +[theme] +inherit = basic +stylesheet = flasky.css diff --git a/docs/becomingbig.rst b/docs/becomingbig.rst new file mode 100644 index 00000000..90cc0138 --- /dev/null +++ b/docs/becomingbig.rst @@ -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. diff --git a/docs/conf.py b/docs/conf.py index 85c52700..9f417120 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -16,7 +16,7 @@ import sys, os # 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 @@ exclude_patterns = ['_build'] #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,7 +90,7 @@ pygments_style = 'sphinx' # 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 @@ -98,7 +98,7 @@ html_theme = 'nature' #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 # "