Skip to content
Myr

Merge pull request #2710 from davidism/0.12-docs-theme

Before adoption: this commit came in with the history the project adopted, so no landing records it.

backport #2709 use theme provided by pallets-sphinx-themes

authored by David Lord · committed by GitHub · parents b354c37, 679bf00 · Browse files · 26 files+164 added−658 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

26 files+164 added−658 removed

  • other:+164 added−658 removed

26 files+164 added−658 removed

deleted:docs/_templates/sidebarintro.html-22 removed
deleted:docs/_templates/sidebarlogo.html-3 removed
modified:docs/deploying/fastcgi.rst+1 added-1 removed
235 unmodified lines
236237.. _nginx: http://nginx.org/238.. _lighttpd: http://www.lighttpd.net/239.. _cherokee: http://cherokee-project.com/240.. _flup: https://pypi.python.org/pypi/flup240.. _flup: https://pypi.org/project/flup/
modified:docs/deploying/mod_wsgi.rst+1 added-1 removed
132 unmodified lines
133For more information consult the `mod_wsgi documentation`_.134135.. _mod_wsgi: https://github.com/GrahamDumpleton/mod_wsgi136.. _installation instructions: http://modwsgi.readthedocs.io/en/develop/installation.html137.. _virtual python: https://pypi.python.org/pypi/virtualenv137.. _virtual python: https://pypi.org/project/virtualenv/138.. _mod_wsgi documentation: http://modwsgi.readthedocs.io/en/develop/index.html139140Troubleshooting141---------------
76 unmodified lines
modified:docs/patterns/distribute.rst+1 added-1 removed
171 unmodified lines
172folder instead of copying the data over. You can then continue to work on173the code without having to run ``install`` again after each change.174175176.. _pip: https://pypi.python.org/pypi/pip176.. _pip: https://pypi.org/project/pip/177.. _Setuptools: https://pythonhosted.org/setuptools
modified:docs/patterns/jquery.rst+2 added-4 removed
160 unmodified lines
161 data arrived, it will call the given function with the return value as162 argument. Note that we can use the `$SCRIPT_ROOT` variable here that163 we set earlier.164165If you don't get the whole picture, download the `sourcecode166for this example167<https://github.com/pallets/flask/tree/master/examples/jqueryexample>`_168from GitHub.165If you don't get the whole picture, download the :gh:`sourcecode for166this example <examples/jqueryexample>` from GitHub.
modified:docs/patterns/sqlalchemy.rst+1 added-1 removed
18 unmodified lines
19there is a Flask extension that handles that for you. This is recommended20if you want to get started quickly.2122You can download `Flask-SQLAlchemy`_ from `PyPI23<https://pypi.python.org/pypi/Flask-SQLAlchemy>`_.23<https://pypi.org/project/Flask-SQLAlchemy/>`_.2425.. _Flask-SQLAlchemy: http://pythonhosted.org/Flask-SQLAlchemy/2627
191 unmodified lines
modified:docs/patterns/wtforms.rst+1 added-1 removed
15 unmodified lines
1617 The `Flask-WTF`_ extension expands on this pattern and adds a18 few little helpers that make working with forms and Flask more19 fun. You can get it from `PyPI20 <https://pypi.python.org/pypi/Flask-WTF>`_.20 <https://pypi.org/project/Flask-WTF/>`_.2122.. _Flask-WTF: http://pythonhosted.org/Flask-WTF/2324The Forms
102 unmodified lines
modified:docs/tutorial/dbcon.rst+5 added-7 removed
64 unmodified lines
65 group these module-level functions together, and put your new66 ``get_db`` and ``close_db`` functions below your existing67 ``connect_db`` function (following the tutorial line-by-line).6869 If you need a moment to find your bearings, take a look at how the `example70 source`_ is organized. In Flask, you can put all of your application code71 into a single Python module. You don't have to, and if your app :ref:`grows72 larger <larger-applications>`, it's a good idea not to.7374.. _example source:75 https://github.com/pallets/flask/tree/master/examples/flaskr/69 If you need a moment to find your bearings, take a look at how the70 :gh:`example source <examples/flaskr>` is organized. In Flask, you71 can put all of your application code into a single Python module.72 You don't have to, and if your app73 :ref:`grows larger <larger-applications>`, it's a good idea not to.
modified:docs/tutorial/index.rst+1 added-4 removed
10 unmodified lines
11as a database (which comes out of the box with Python) so there is nothing12else you need.1314If you want the full source code in advance or for comparison, check out15the `example source`_.15the :gh:`example source <examples/flaskr>`.1617.. _example source:18 https://github.com/pallets/flask/tree/master/examples/flaskr/1917.. toctree::18 :maxdepth: 21920 introduction
10 unmodified lines
deleted:docs/_themesnot shown

Its text is not shown, deleted.

deleted:docs/.gitignore-1 removed
1_build
modified:docs/api.rst+1 added-1 removed
701 unmodified lines
702 do nothing but will fail with a :exc:`RuntimeError` for all other703 operations, including connecting.704705706.. _blinker: https://pypi.python.org/pypi/blinker706.. _blinker: https://pypi.org/project/blinker/707708709Class-Based Views710-----------------
181 unmodified lines
modified:docs/conf.py+114 added-245 removed
1# -*- coding: utf-8 -*-2#3# Flask documentation build configuration file, created by4# sphinx-quickstart on Tue Apr 6 15:24:58 2010.5#6# This file is execfile()d with the current directory set to its containing dir.7#8# Note that not all possible configuration values are present in this9# autogenerated file.10#11# All configuration values have a default; values that are commented out12# serve to show the default.2from __future__ import print_function14from datetime import datetime15import os16import sys17import pkg_resources319# If extensions (or modules to document with autodoc) are in another directory,20# add these directories to sys.path here. If the directory is relative to the21# documentation root, use os.path.abspath to make it absolute, like shown here.22sys.path.append(os.path.join(os.path.dirname(__file__), '_themes'))23sys.path.append(os.path.dirname(__file__))4import inspect5import re625# -- General configuration -----------------------------------------------------7from pallets_sphinx_themes import ProjectLink, get_version827# If your documentation needs a minimal Sphinx version, state it here.28#needs_sphinx = '1.0'9# Project --------------------------------------------------------------1030# Add any Sphinx extension module names here, as strings. They can be extensions31# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.11project = 'Flask'12copyright = '2010 Pallets Team'13author = 'Pallets Team'14release, version = get_version('Flask')1516# General --------------------------------------------------------------1718master_doc = 'index'1920extensions = [21 'sphinx.ext.autodoc',22 'sphinx.ext.intersphinx',35 'flaskdocext'23 'sphinxcontrib.log_cabinet',24]2538# Add any paths that contain templates here, relative to this directory.39templates_path = ['_templates']26intersphinx_mapping = {27 # 'python': ('https://docs.python.org/3/', None),28 # 'werkzeug': ('http://werkzeug.pocoo.org/docs/', None),29 # 'click': ('http://click.pocoo.org/', None),30 # 'jinja': ('http://jinja.pocoo.org/docs/', None),31 # 'itsdangerous': ('https://pythonhosted.org/itsdangerous', None),32 # 'sqlalchemy': ('https://docs.sqlalchemy.org/en/latest/', None),33 # 'wtforms': ('https://wtforms.readthedocs.io/en/latest/', None),34 # 'blinker': ('https://pythonhosted.org/blinker/', None),35}3641# The suffix of source filenames.42source_suffix = '.rst'37# HTML -----------------------------------------------------------------3844# The encoding of source files.45#source_encoding = 'utf-8-sig'4647# The master toctree document.48master_doc = 'index'4950# General information about the project.51project = u'Flask'52copyright = u'2010 - {0}, Armin Ronacher'.format(datetime.utcnow().year)5354# The version info for the project you're documenting, acts as replacement for55# |version| and |release|, also used in various other places throughout the56# built documents.57try:58 release = pkg_resources.get_distribution('Flask').version59except pkg_resources.DistributionNotFound:60 print('Flask must be installed to build the documentation.')61 print('Install from source using `pip install -e .` in a virtualenv.')62 sys.exit(1)6364if 'dev' in release:65 release = ''.join(release.partition('dev')[:2])6667version = '.'.join(release.split('.')[:2])6869# The language for content autogenerated by Sphinx. Refer to documentation70# for a list of supported languages.71#language = None7273# There are two options for replacing |today|: either, you set today to some74# non-false value, then it is used:75#today = ''76# Else, today_fmt is used as the format for a strftime call.77#today_fmt = '%B %d, %Y'7879# List of patterns, relative to source directory, that match files and80# directories to ignore when looking for source files.81exclude_patterns = ['_build']8283# The reST default role (used for this markup: `text`) to use for all documents.84#default_role = None8586# If true, '()' will be appended to :func: etc. cross-reference text.87#add_function_parentheses = True8889# If true, the current module name will be prepended to all description90# unit titles (such as .. function::).91#add_module_names = True9293# If true, sectionauthor and moduleauthor directives will be shown in the94# output. They are ignored by default.95#show_authors = False9697# A list of ignored prefixes for module index sorting.98#modindex_common_prefix = []99100101# -- Options for HTML output ---------------------------------------------------102103# The theme to use for HTML and HTML Help pages. Major themes that come with104# Sphinx are currently 'default' and 'sphinxdoc'.105# html_theme = 'default'106107# Theme options are theme-specific and customize the look and feel of a theme108# further. For a list of options available for each theme, see the109# documentation.110# html_theme_options = {}111112# Add any paths that contain custom themes here, relative to this directory.113html_theme_path = ['_themes']114115# The name for this set of Sphinx documents. If None, it defaults to116# "<project> v<release> documentation".117#html_title = None118119# A shorter title for the navigation bar. Default is the same as html_title.120#html_short_title = None121122# The name of an image file (relative to this directory) to place at the top123# of the sidebar. Do not set, template magic!124#html_logo = None125126# The name of an image file (within the static path) to use as favicon of the127# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32128# pixels large.129html_favicon = '_static/flask-favicon.ico'130131# Add any paths that contain custom static files (such as style sheets) here,132# relative to this directory. They are copied after the builtin static files,133# so a file named "default.css" will overwrite the builtin "default.css".134html_static_path = ['_static']135136# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,137# using the given strftime format.138#html_last_updated_fmt = '%b %d, %Y'139140# If true, SmartyPants will be used to convert quotes and dashes to141# typographically correct entities.142#html_use_smartypants = True143144# Custom sidebar templates, maps document names to template names.39html_theme = 'flask'40html_context = {41 'project_links': [42 ProjectLink('Flask Website', 'https://palletsprojects.com/p/flask/'),43 ProjectLink('PyPI releases', 'https://pypi.org/project/Flask/'),44 ProjectLink('Source Code', 'https://github.com/pallets/flask/'),45 ProjectLink(46 'Issue Tracker', 'https://github.com/pallets/flask/issues/'),47 ],48 'canonical_url': 'http://flask.pocoo.org/docs/{}/'.format(version),49 'carbon_ads_args': 'zoneid=1673&serve=C6AILKT&placement=pocooorg',50}51html_sidebars = {52 'index': [147 'sidebarintro.html',148 'sourcelink.html',149 'searchbox.html'53 'project.html',54 'versions.html',55 'searchbox.html',56 ],57 '**': [152 'sidebarlogo.html',58 'localtoc.html',59 'relations.html',155 'sourcelink.html',156 'searchbox.html'60 'versions.html',61 'carbon_ads.html',62 'searchbox.html',63 ]64}65html_static_path = ['_static']66html_favicon = '_static/flask-favicon.ico'67html_logo = '_static/flask.png'68html_additional_pages = {69 '404': '404.html',70}71html_show_sourcelink = False72160# Additional templates that should be rendered to pages, maps page names to161# template names.162#html_additional_pages = {}73# LaTeX ----------------------------------------------------------------74164# If false, no module index is generated.165html_use_modindex = False166167# If false, no index is generated.168#html_use_index = True169170# If true, the index is split into individual pages for each letter.171#html_split_index = False172173# If true, links to the reST sources are added to the pages.174#html_show_sourcelink = True175176# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.177html_show_sphinx = False178179# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.180#html_show_copyright = True181182# If true, an OpenSearch description file will be output, and all pages will183# contain a <link> tag referring to it. The value of this option must be the184# base URL from which the finished HTML is served.185#html_use_opensearch = ''186187# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").188#html_file_suffix = ''189190# Output file base name for HTML help builder.191htmlhelp_basename = 'Flaskdoc'192193194# -- Options for LaTeX output --------------------------------------------------195196# Grouping the document tree into LaTeX files. List of tuples197# (source start file, target name, title, author, documentclass [howto/manual]).75latex_documents = [199 ('latexindex', 'Flask.tex', u'Flask Documentation', u'Armin Ronacher', 'manual'),76 (master_doc, 'Flask.tex', 'Flask Documentation', 'Pallets Team', 'manual'),77]201202# Documents to append as an appendix to all manuals.203#latex_appendices = []204205# If false, no module index is generated.78latex_use_modindex = False20779latex_elements = {209 'fontpkg': r'\usepackage{mathpazo}',80 'papersize': 'a4paper',81 'pointsize': '12pt',82 'fontpkg': r'\usepackage{mathpazo}',212 'preamble': r'\usepackage{flaskstyle}'83 'preamble': r'\usepackage{flaskstyle}',84}85latex_use_parts = True21586latex_additional_files = ['flaskstyle.sty', 'logo.pdf']8788# linkcheck ------------------------------------------------------------89219# -- Options for Epub output ---------------------------------------------------90linkcheck_anchors = False91221# Bibliographic Dublin Core info.222#epub_title = ''223#epub_author = ''224#epub_publisher = ''225#epub_copyright = ''92# Local Extensions -----------------------------------------------------93227# The language of the text. It defaults to the language option228# or en if the language is not set.229#epub_language = ''230231# The scheme of the identifier. Typical schemes are ISBN or URL.232#epub_scheme = ''233234# The unique identifier of the text. This can be a ISBN number235# or the project homepage.236#epub_identifier = ''237238# A unique identification for the text.239#epub_uid = ''240241# HTML files that should be inserted before the pages created by sphinx.242# The format is a list of tuples containing the path and title.243#epub_pre_files = []244245# HTML files shat should be inserted after the pages created by sphinx.246# The format is a list of tuples containing the path and title.247#epub_post_files = []248249# A list of files that should not be packed into the epub file.250#epub_exclude_files = []251252# The depth of the table of contents in toc.ncx.253#epub_tocdepth = 3254255intersphinx_mapping = {256 'python': ('https://docs.python.org/3/', None),257 'werkzeug': ('http://werkzeug.pocoo.org/docs/', None),258 'click': ('http://click.pocoo.org/', None),259 'jinja': ('http://jinja.pocoo.org/docs/', None),260 'sqlalchemy': ('http://docs.sqlalchemy.org/en/latest/', None),261 'wtforms': ('https://wtforms.readthedocs.io/en/latest/', None),262 'blinker': ('https://pythonhosted.org/blinker/', None)263}264265try:266 __import__('flask_theme_support')267 pygments_style = 'flask_theme_support.FlaskyStyle'268 html_theme = 'flask'269 html_theme_options = {270 'touch_icon': 'touch-icon.png'271 }272except ImportError:273 print('-' * 74)274 print('Warning: Flask themes unavailable. Building with default theme')275 print('If you want the Flask themes, run this command and build again:')276 print()277 print(' git submodule update --init')278 print('-' * 74)279280281# unwrap decorators94def unwrap_decorators():95 import sphinx.util.inspect as inspect96 import functools97
8 unmodified lines
106 rv._original_function = wrapped107 return rv108 functools.update_wrapper = update_wrapper109110111unwrap_decorators()112del unwrap_decorators113114115_internal_mark_re = re.compile(r'^\s*:internal:\s*$(?m)', re.M)116117118def skip_internal(app, what, name, obj, skip, options):119 docstring = inspect.getdoc(obj) or ''120121 if skip or _internal_mark_re.search(docstring) is not None:122 return True123124125def cut_module_meta(app, what, name, obj, options, lines):126 """Remove metadata from autodoc output."""127 if what != 'module':128 return129130 lines[:] = [131 line for line in lines132 if not line.startswith((':copyright:', ':license:'))133 ]134135136def github_link(137 name, rawtext, text, lineno, inliner, options=None, content=None138):139 app = inliner.document.settings.env.app140 release = app.config.release141 base_url = 'https://github.com/pallets/flask/tree/'142143 if text.endswith('>'):144 words, text = text[:-1].rsplit('<', 1)145 words = words.strip()146 else:147 words = None148149 if release.endswith('dev'):150 url = '{0}master/{1}'.format(base_url, text)151 else:152 url = '{0}{1}/{2}'.format(base_url, release, text)153154 if words is None:155 words = url156157 from docutils.nodes import reference158 from docutils.parsers.rst.roles import set_classes159 options = options or {}160 set_classes(options)161 node = reference(rawtext, words, refuri=url, **options)162 return [node], []163164165def setup(app):166 app.connect('autodoc-skip-member', skip_internal)167 app.connect('autodoc-process-docstring', cut_module_meta)168 app.add_role('gh', github_link)
modified:docs/extensions.rst+1 added-24 removed
27 unmodified lines
28Building Extensions29-------------------3031While `Flask Extension Registry`_ contains many Flask extensions, you may not find32an extension that fits your need. If this is the case, you can always create your own. 32an extension that fits your need. If this is the case, you can always create your own.33Consider reading :ref:`extension-dev` to develop your own Flask extension.3435Flask Before 0.836----------------3738If you are using Flask 0.7 or earlier the :data:`flask.ext` package will not39exist, instead you have to import from ``flaskext.foo`` or ``flask_foo``40depending on how the extension is distributed. If you want to develop an41application that supports Flask 0.7 or earlier you should still import42from the :data:`flask.ext` package. We provide you with a compatibility43module that provides this package for older versions of Flask. You can44download it from GitHub: `flaskext_compat.py`_4546And here is how you can use it::4748 import flaskext_compat49 flaskext_compat.activate()5051 from flask.ext import foo5253Once the ``flaskext_compat`` module is activated the :data:`flask.ext` will54exist and you can start importing from there.555635.. _Flask Extension Registry: http://flask.pocoo.org/extensions/58.. _flaskext_compat.py: https://raw.githubusercontent.com/pallets/flask/master/scripts/flaskext_compat.py
deleted:docs/flaskdocext.py-16 removed
1import re2import inspect345_internal_mark_re = re.compile(r'^\s*:internal:\s*$(?m)')678def skip_member(app, what, name, obj, skip, options):9 docstring = inspect.getdoc(obj)10 if skip:11 return True12 return _internal_mark_re.search(docstring or '') is not None131415def setup(app):16 app.connect('autodoc-skip-member', skip_member)
deleted:docs/flaskext.py-86 removed
1# flasky extensions. flasky pygments style based on tango style2from pygments.style import Style3from pygments.token import Keyword, Name, Comment, String, Error, \4 Number, Operator, Generic, Whitespace, Punctuation, Other, Literal567class FlaskyStyle(Style):8 background_color = "#f8f8f8"9 default_style = ""1011 styles = {12 # No corresponding class for the following:13 #Text: "", # class: ''14 Whitespace: "underline #f8f8f8", # class: 'w'15 Error: "#a40000 border:#ef2929", # class: 'err'16 Other: "#000000", # class 'x'1718 Comment: "italic #8f5902", # class: 'c'19 Comment.Preproc: "noitalic", # class: 'cp'2021 Keyword: "bold #004461", # class: 'k'22 Keyword.Constant: "bold #004461", # class: 'kc'23 Keyword.Declaration: "bold #004461", # class: 'kd'24 Keyword.Namespace: "bold #004461", # class: 'kn'25 Keyword.Pseudo: "bold #004461", # class: 'kp'26 Keyword.Reserved: "bold #004461", # class: 'kr'27 Keyword.Type: "bold #004461", # class: 'kt'2829 Operator: "#582800", # class: 'o'30 Operator.Word: "bold #004461", # class: 'ow' - like keywords3132 Punctuation: "bold #000000", # class: 'p'3334 # because special names such as Name.Class, Name.Function, etc.35 # are not recognized as such later in the parsing, we choose them36 # to look the same as ordinary variables.37 Name: "#000000", # class: 'n'38 Name.Attribute: "#c4a000", # class: 'na' - to be revised39 Name.Builtin: "#004461", # class: 'nb'40 Name.Builtin.Pseudo: "#3465a4", # class: 'bp'41 Name.Class: "#000000", # class: 'nc' - to be revised42 Name.Constant: "#000000", # class: 'no' - to be revised43 Name.Decorator: "#888", # class: 'nd' - to be revised44 Name.Entity: "#ce5c00", # class: 'ni'45 Name.Exception: "bold #cc0000", # class: 'ne'46 Name.Function: "#000000", # class: 'nf'47 Name.Property: "#000000", # class: 'py'48 Name.Label: "#f57900", # class: 'nl'49 Name.Namespace: "#000000", # class: 'nn' - to be revised50 Name.Other: "#000000", # class: 'nx'51 Name.Tag: "bold #004461", # class: 'nt' - like a keyword52 Name.Variable: "#000000", # class: 'nv' - to be revised53 Name.Variable.Class: "#000000", # class: 'vc' - to be revised54 Name.Variable.Global: "#000000", # class: 'vg' - to be revised55 Name.Variable.Instance: "#000000", # class: 'vi' - to be revised5657 Number: "#990000", # class: 'm'5859 Literal: "#000000", # class: 'l'60 Literal.Date: "#000000", # class: 'ld'6162 String: "#4e9a06", # class: 's'63 String.Backtick: "#4e9a06", # class: 'sb'64 String.Char: "#4e9a06", # class: 'sc'65 String.Doc: "italic #8f5902", # class: 'sd' - like a comment66 String.Double: "#4e9a06", # class: 's2'67 String.Escape: "#4e9a06", # class: 'se'68 String.Heredoc: "#4e9a06", # class: 'sh'69 String.Interpol: "#4e9a06", # class: 'si'70 String.Other: "#4e9a06", # class: 'sx'71 String.Regex: "#4e9a06", # class: 'sr'72 String.Single: "#4e9a06", # class: 's1'73 String.Symbol: "#4e9a06", # class: 'ss'7475 Generic: "#000000", # class: 'g'76 Generic.Deleted: "#a40000", # class: 'gd'77 Generic.Emph: "italic #000000", # class: 'ge'78 Generic.Error: "#ef2929", # class: 'gr'79 Generic.Heading: "bold #000080", # class: 'gh'80 Generic.Inserted: "#00A000", # class: 'gi'81 Generic.Output: "#888", # class: 'go'82 Generic.Prompt: "#745334", # class: 'gp'83 Generic.Strong: "bold #000000", # class: 'gs'84 Generic.Subheading: "bold #800080", # class: 'gu'85 Generic.Traceback: "bold #a40000", # class: 'gt'86 }
modified:docs/index.rst+1 added
4 unmodified lines
56.. image:: _static/logo-full.png7 :alt: Flask: web development, one drop at a time8 :class: floatingflask9 :align: right1011Welcome to Flask's documentation. This documentation is divided into12different parts. I recommend that you get started with13:ref:`installation` and then head over to the :ref:`quickstart`.
19 unmodified lines
modified:docs/make.bat+18 added-121 removed
1@ECHO OFF23pushd %~dp045REM Command file for Sphinx documentation67if "%SPHINXBUILD%" == "" (8 set SPHINXBUILD=sphinx-build9)10set SOURCEDIR=.11set BUILDDIR=_build9set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% .10if NOT "%PAPER%" == "" (11 set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%12)12set SPHINXPROJ=Flask1314if "%1" == "" goto help1516if "%1" == "help" (17 :help18 echo.Please use `make ^<target^>` where ^<target^> is one of19 echo. html to make standalone HTML files20 echo. dirhtml to make HTML files named index.html in directories21 echo. singlehtml to make a single large HTML file22 echo. pickle to make pickle files23 echo. json to make JSON files24 echo. htmlhelp to make HTML files and a HTML help project25 echo. qthelp to make HTML files and a qthelp project26 echo. devhelp to make HTML files and a Devhelp project27 echo. epub to make an epub28 echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter29 echo. changes to make an overview over all changed/added/deprecated items30 echo. linkcheck to check all external links for integrity31 echo. doctest to run all doctests embedded in the documentation if enabled32 goto end33)3435if "%1" == "clean" (36 for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i37 del /q /s %BUILDDIR%\*38 goto end39)4041if "%1" == "html" (42 %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html16%SPHINXBUILD% >NUL 2>NUL17if errorlevel 9009 (18 echo.44 echo.Build finished. The HTML pages are in %BUILDDIR%/html.45 goto end46)4748if "%1" == "dirhtml" (49 %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml19 echo.The 'sphinx-build' command was not found. Make sure you have Sphinx20 echo.installed, then set the SPHINXBUILD environment variable to point21 echo.to the full path of the 'sphinx-build' executable. Alternatively you22 echo.may add the Sphinx directory to PATH.23 echo.51 echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.52 goto end24 echo.If you don't have Sphinx installed, grab it from25 echo.http://sphinx-doc.org/26 exit /b 127)2855if "%1" == "singlehtml" (56 %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml57 echo.58 echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml.59 goto end60)29%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%30goto end3162if "%1" == "pickle" (63 %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle64 echo.65 echo.Build finished; now you can process the pickle files.66 goto end67)32:help33%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%3469if "%1" == "json" (70 %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json71 echo.72 echo.Build finished; now you can process the JSON files.73 goto end74)7576if "%1" == "htmlhelp" (77 %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp78 echo.79 echo.Build finished; now you can run HTML Help Workshop with the ^80.hhp project file in %BUILDDIR%/htmlhelp.81 goto end82)8384if "%1" == "qthelp" (85 %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp86 echo.87 echo.Build finished; now you can run "qcollectiongenerator" with the ^88.qhcp project file in %BUILDDIR%/qthelp, like this:89 echo.^> qcollectiongenerator %BUILDDIR%\qthelp\Flask.qhcp90 echo.To view the help file:91 echo.^> assistant -collectionFile %BUILDDIR%\qthelp\Flask.ghc92 goto end93)9495if "%1" == "devhelp" (96 %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% _build/devhelp97 echo.98 echo.Build finished.99 goto end100)101102if "%1" == "epub" (103 %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub104 echo.105 echo.Build finished. The epub file is in %BUILDDIR%/epub.106 goto end107)108109if "%1" == "latex" (110 %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex111 echo.112 echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.113 goto end114)115116if "%1" == "changes" (117 %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes118 echo.119 echo.The overview file is in %BUILDDIR%/changes.120 goto end121)122123if "%1" == "linkcheck" (124 %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck125 echo.126 echo.Link check complete; look for any errors in the above output ^127or in %BUILDDIR%/linkcheck/output.txt.128 goto end129)130131if "%1" == "doctest" (132 %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest133 echo.134 echo.Testing of doctests in the sources finished, look at the ^135results in %BUILDDIR%/doctest/output.txt.136 goto end137)13835:end36popd
modified:docs/Makefile+10 added-108 removed
1# Makefile for Sphinx documentation1# Minimal makefile for Sphinx documentation2#34# You can set these variables from the command line.5SPHINXOPTS =6SPHINXBUILD = sphinx-build7PAPER =7SPHINXPROJ = Flask8SOURCEDIR = .9BUILDDIR = _build1010# Internal variables.11PAPEROPT_a4 = -D latex_paper_size=a412PAPEROPT_letter = -D latex_paper_size=letter13ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .1415.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp epub latex changes linkcheck doctest1611# Put it first so that "make" without argument is like "make help".12help:18 @echo "Please use \`make <target>' where <target> is one of"19 @echo " html to make standalone HTML files"20 @echo " dirhtml to make HTML files named index.html in directories"21 @echo " singlehtml to make a single large HTML file"22 @echo " pickle to make pickle files"23 @echo " json to make JSON files"24 @echo " htmlhelp to make HTML files and a HTML help project"25 @echo " qthelp to make HTML files and a qthelp project"26 @echo " devhelp to make HTML files and a Devhelp project"27 @echo " epub to make an epub"28 @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"29 @echo " latexpdf to make LaTeX files and run them through pdflatex"30 @echo " changes to make an overview of all changed/added/deprecated items"31 @echo " linkcheck to check all external links for integrity"32 @echo " doctest to run all doctests embedded in the documentation (if enabled)"13 @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)1434clean:35 -rm -rf $(BUILDDIR)/*15.PHONY: help Makefile1637html:38 $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html39 @echo40 @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."4142dirhtml:43 $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml44 @echo45 @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."4647singlehtml:48 $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml49 @echo50 @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."5152pickle:53 $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle54 @echo55 @echo "Build finished; now you can process the pickle files."5657json:58 $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json59 @echo60 @echo "Build finished; now you can process the JSON files."6162htmlhelp:63 $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp64 @echo65 @echo "Build finished; now you can run HTML Help Workshop with the" \66 ".hhp project file in $(BUILDDIR)/htmlhelp."6768qthelp:69 $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp70 @echo71 @echo "Build finished; now you can run "qcollectiongenerator" with the" \72 ".qhcp project file in $(BUILDDIR)/qthelp, like this:"73 @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/Flask.qhcp"74 @echo "To view the help file:"75 @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/Flask.qhc"7677devhelp:78 $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) _build/devhelp79 @echo80 @echo "Build finished."81 @echo "To view the help file:"82 @echo "# mkdir -p $$HOME/.local/share/devhelp/Flask"83 @echo "# ln -s _build/devhelp $$HOME/.local/share/devhelp/Flask"84 @echo "# devhelp"8586epub:87 $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub88 @echo89 @echo "Build finished. The epub file is in $(BUILDDIR)/epub."9091latex:92 $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex93 @echo94 @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."95 @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \96 "run these through (pdf)latex."9798latexpdf: latex99 $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) _build/latex100 @echo "Running LaTeX files through pdflatex..."101 make -C _build/latex all-pdf102 @echo "pdflatex finished; the PDF files are in _build/latex."103104changes:105 $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes106 @echo107 @echo "The overview file is in $(BUILDDIR)/changes."108109linkcheck:110 $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck111 @echo112 @echo "Link check complete; look for any errors in the above output " \113 "or in $(BUILDDIR)/linkcheck/output.txt."114115doctest:116 $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest117 @echo "Testing of doctests in the sources finished, look at the " \118 "results in $(BUILDDIR)/doctest/output.txt."17# Catch-all target: route all unknown targets to Sphinx using the new18# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).19%: Makefile20 @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
modified:docs/signals.rst+1 added-1 removed
185 unmodified lines
186187Take a look at :ref:`core-signals-list` for a list of all builtin signals.188189190.. _blinker: https://pypi.python.org/pypi/blinker190.. _blinker: https://pypi.org/project/blinker/
modified:docs/testing.rst+2 added-5 removed
19 unmodified lines
20---------------2122First, we need an application to test; we will use the application from23the :ref:`tutorial`. If you don't have that application yet, get the24sources from `the examples`_.24sources from :gh:`the examples <examples/flaskr>`.2526.. _the examples:27 https://github.com/pallets/flask/tree/master/examples/flaskr/2826The Testing Skeleton27--------------------2829In order to test the application, we add a second module
162 unmodified lines
192suite.193194195.. _MiniTwit Example:199 https://github.com/pallets/flask/tree/master/examples/minitwit/196 https://github.com/pallets/flask/tree/0.12.3/examples/minitwit/197198199Other Testing Tricks200--------------------
154 unmodified lines
modified:docs/upgrading.rst+1 added-1 removed
213 unmodified lines
214215To apply the upgrade script do the following:2162171. Download the script: `flask-07-upgrade.py218 <https://raw.githubusercontent.com/pallets/flask/master/scripts/flask-07-upgrade.py>`_218 <https://raw.githubusercontent.com/pallets/flask/0.12.3/scripts/flask-07-upgrade.py>`_2192. Run it in the directory of your application::220221 python flask-07-upgrade.py > patchfile.diff222
250 unmodified lines
modified:.gitignore+1 added
9 unmodified lines
10_mailinglist11.tox12.cache/13.idea/14docs/_build/1516# Coverage reports17htmlcov18.coverage
2 unmodified lines
deleted:.gitmodules-3 removed
1[submodule "docs/_themes"]2 path = docs/_themes3 url = https://github.com/mitsuhiko/flask-sphinx-themes.git
modified:CHANGES+1 added-1 removed
522 unmodified lines
523- modules can now register for a subdomain instead of just an URL524 prefix. This makes it possible to bind a whole module to a525 configurable subdomain.526527.. _blinker: https://pypi.python.org/pypi/blinker527.. _blinker: https://pypi.org/project/blinker/528529Version 0.5.2530-------------531
106 unmodified lines