Skip to content
Myr

use theme provided by pallets-sphinx-themes

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

authored by David Lord · committed by David Lord · parent 3a0ea72 · Browse files · 25 files+186 added−586 removed
This commit

State

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

Diff stats

25 files+186 added−586 removed

  • other:+186 added−586 removed

25 files+186 added−586 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: https://nginx.org/238.. _lighttpd: https://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: https://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: https://modwsgi.readthedocs.io/en/develop/index.html139140Troubleshooting141---------------
76 unmodified lines
modified:docs/patterns/caching.rst+1 added-1 removed
25 unmodified lines
26 from werkzeug.contrib.cache import SimpleCache27 cache = SimpleCache()2829If you want to use memcached, make sure to have one of the memcache modules30supported (you get them from `PyPI <https://pypi.python.org/pypi>`_) and a30supported (you get them from `PyPI <https://pypi.org/>`_) and a31memcached server running somewhere. This is how you connect to such an32memcached server then::3334 from werkzeug.contrib.cache import MemcachedCache
35 unmodified lines
modified:docs/patterns/distribute.rst+2 added-2 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/pip177.. _Setuptools: https://pypi.python.org/pypi/setuptools176.. _pip: https://pypi.org/project/pip/177.. _Setuptools: https://pypi.org/project/setuptools/
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://flask-sqlalchemy.pocoo.org/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: https://flask-wtf.readthedocs.io/en/stable/2324The Forms
102 unmodified lines
deleted:docs/.gitignore-1 removed
1_build
modified:docs/api.rst+1 added-1 removed
629 unmodified lines
630 do nothing but will fail with a :exc:`RuntimeError` for all other631 operations, including connecting.632633634.. _blinker: https://pypi.python.org/pypi/blinker634.. _blinker: https://pypi.org/project/blinker/635636.. _class-based-views:637638Class-Based Views
184 unmodified lines
modified:docs/conf.py+105 added-277 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_function315import datetime16import os17import sys18import time4import inspect5import re620import pkg_resources7from pallets_sphinx_themes import DocVersion, ProjectLink, get_version822BUILD_DATE = datetime.datetime.utcfromtimestamp(int(os.environ.get('SOURCE_DATE_EPOCH', time.time())))9# Project --------------------------------------------------------------1024# If extensions (or modules to document with autodoc) are in another directory,25# add these directories to sys.path here. If the directory is relative to the26# documentation root, use os.path.abspath to make it absolute, like shown here.27sys.path.append(os.path.dirname(__file__))11project = 'Flask'12copyright = '2010 Pallets Team'13author = 'Pallets Team'14release, version = get_version('Flask')1529# -- General configuration -----------------------------------------------------16# General --------------------------------------------------------------1731# If your documentation needs a minimal Sphinx version, state it here.32#needs_sphinx = '1.0'18master_doc = 'index'1934# Add any Sphinx extension module names here, as strings. They can be extensions35# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.20extensions = [21 'sphinx.ext.autodoc',22 'sphinx.ext.intersphinx',39 'flaskdocext'23 'sphinxcontrib.log_cabinet',24]2542try:43 __import__('sphinxcontrib.log_cabinet')44except ImportError:45 print('sphinxcontrib-log-cabinet is not installed.')46 print('Changelog directives will not be re-organized.')47else:48 extensions.append('sphinxcontrib.log_cabinet')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}3650# Add any paths that contain templates here, relative to this directory.51templates_path = ['_templates']37# HTML -----------------------------------------------------------------3853# The suffix of source filenames.54source_suffix = '.rst'5556# The encoding of source files.57#source_encoding = 'utf-8-sig'5859# The master toctree document.60master_doc = 'index'6162# General information about the project.63project = u'Flask'64copyright = u'2010 - {0}, Armin Ronacher'.format(BUILD_DATE.year)6566# The version info for the project you're documenting, acts as replacement for67# |version| and |release|, also used in various other places throughout the68# built documents.69try:70 release = pkg_resources.get_distribution('Flask').version71except pkg_resources.DistributionNotFound:72 print('Flask must be installed to build the documentation.')73 print('Install from source using `pip install -e .` in a virtualenv.')74 sys.exit(1)7576if 'dev' in release:77 release = ''.join(release.partition('dev')[:2])7879version = '.'.join(release.split('.')[:2])8081# The language for content autogenerated by Sphinx. Refer to documentation82# for a list of supported languages.83#language = None8485# There are two options for replacing |today|: either, you set today to some86# non-false value, then it is used:87#today = ''88# Else, today_fmt is used as the format for a strftime call.89#today_fmt = '%B %d, %Y'9091# List of patterns, relative to source directory, that match files and92# directories to ignore when looking for source files.93exclude_patterns = ['_build']9495# The reST default role (used for this markup: `text`) to use for all documents.96#default_role = None9798# If true, '()' will be appended to :func: etc. cross-reference text.99#add_function_parentheses = True100101# If true, the current module name will be prepended to all description102# unit titles (such as .. function::).103#add_module_names = True104105# If true, sectionauthor and moduleauthor directives will be shown in the106# output. They are ignored by default.107#show_authors = False108109# A list of ignored prefixes for module index sorting.110#modindex_common_prefix = []111112113# -- Options for HTML output ---------------------------------------------------114115# The theme to use for HTML and HTML Help pages. Major themes that come with116# Sphinx are currently 'default' and 'sphinxdoc'.117# html_theme = 'default'118119# Theme options are theme-specific and customize the look and feel of a theme120# further. For a list of options available for each theme, see the121# documentation.122# html_theme_options = {}123124# Add any paths that contain custom themes here, relative to this directory.125# html_theme_path = ['_themes']126127# The name for this set of Sphinx documents. If None, it defaults to128# "<project> v<release> documentation".129#html_title = None130131# A shorter title for the navigation bar. Default is the same as html_title.132#html_short_title = None133134# The name of an image file (relative to this directory) to place at the top135# of the sidebar. Do not set, template magic!136#html_logo = None137138# The name of an image file (within the static path) to use as favicon of the139# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32140# pixels large.141html_favicon = '_static/flask-favicon.ico'142143# Add any paths that contain custom static files (such as style sheets) here,144# relative to this directory. They are copied after the builtin static files,145# so a file named "default.css" will overwrite the builtin "default.css".146html_static_path = ['_static']147148# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,149# using the given strftime format.150#html_last_updated_fmt = '%b %d, %Y'151152# If true, SmartyPants will be used to convert quotes and dashes to153# typographically correct entities.154#html_use_smartypants = True155156# 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 'versions': [49 DocVersion('dev', 'Development', 'unstable'),50 DocVersion('1.0', 'Flask 1.0', 'stable'),51 DocVersion('0.12', 'Flask 0.12'),52 ],53 'canonical_url': 'http://flask.pocoo.org/docs/{}/'.format(version),54 'carbon_ads_args': 'zoneid=1673&serve=C6AILKT&placement=pocooorg',55}56html_sidebars = {57 'index': [159 'sidebarintro.html',160 'sourcelink.html',161 'searchbox.html'58 'project.html',59 'versions.html',60 'searchbox.html',61 ],62 '**': [164 'sidebarlogo.html',63 'localtoc.html',64 'relations.html',167 'sourcelink.html',168 'searchbox.html'65 'versions.html',66 'carbon_ads.html',67 'searchbox.html',68 ]69}70html_static_path = ['_static']71html_favicon = '_static/flask-favicon.ico'72html_logo = '_static/flask.png'73html_additional_pages = {74 '404': '404.html',75}76html_show_sourcelink = False77172# Additional templates that should be rendered to pages, maps page names to173# template names.174#html_additional_pages = {}78# LaTeX ----------------------------------------------------------------79176# If false, no module index is generated.177html_use_modindex = False178179# If false, no index is generated.180#html_use_index = True181182# If true, the index is split into individual pages for each letter.183#html_split_index = False184185# If true, links to the reST sources are added to the pages.186#html_show_sourcelink = True187188# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.189html_show_sphinx = False190191# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.192#html_show_copyright = True193194# If true, an OpenSearch description file will be output, and all pages will195# contain a <link> tag referring to it. The value of this option must be the196# base URL from which the finished HTML is served.197#html_use_opensearch = ''198199# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").200#html_file_suffix = ''201202# Output file base name for HTML help builder.203htmlhelp_basename = 'Flaskdoc'204205206# -- Options for LaTeX output --------------------------------------------------207208# Grouping the document tree into LaTeX files. List of tuples209# (source start file, target name, title, author, documentclass [howto/manual]).80latex_documents = [211 ('latexindex', 'Flask.tex', u'Flask Documentation', u'Armin Ronacher', 'manual'),81 (master_doc, 'Flask.tex', 'Flask Documentation', 'Pallets Team', 'manual'),82]213214# Documents to append as an appendix to all manuals.215#latex_appendices = []216217# If false, no module index is generated.83latex_use_modindex = False21984latex_elements = {221 'fontpkg': r'\usepackage{mathpazo}',85 'papersize': 'a4paper',86 'pointsize': '12pt',87 'fontpkg': r'\usepackage{mathpazo}',224 'preamble': r'\usepackage{flaskstyle}'88 'preamble': r'\usepackage{flaskstyle}',89}90latex_use_parts = True22791latex_additional_files = ['flaskstyle.sty', 'logo.pdf']9293# linkcheck ------------------------------------------------------------94231# -- Options for Epub output ---------------------------------------------------95linkcheck_anchors = False96233# Bibliographic Dublin Core info.234#epub_title = ''235#epub_author = ''236#epub_publisher = ''237#epub_copyright = ''97# Local Extensions -----------------------------------------------------98239# The language of the text. It defaults to the language option240# or en if the language is not set.241#epub_language = ''242243# The scheme of the identifier. Typical schemes are ISBN or URL.244#epub_scheme = ''245246# The unique identifier of the text. This can be an ISBN number247# or the project homepage.248#epub_identifier = ''249250# A unique identification for the text.251#epub_uid = ''252253# HTML files that should be inserted before the pages created by sphinx.254# The format is a list of tuples containing the path and title.255#epub_pre_files = []256257# HTML files shat should be inserted after the pages created by sphinx.258# The format is a list of tuples containing the path and title.259#epub_post_files = []260261# A list of files that should not be packed into the epub file.262#epub_exclude_files = []263264# The depth of the table of contents in toc.ncx.265#epub_tocdepth = 3266267intersphinx_mapping = {268 'python': ('https://docs.python.org/3/', None),269 'werkzeug': ('http://werkzeug.pocoo.org/docs/', None),270 'click': ('http://click.pocoo.org/', None),271 'jinja': ('http://jinja.pocoo.org/docs/', None),272 'itsdangerous': ('https://pythonhosted.org/itsdangerous', None),273 'sqlalchemy': ('https://docs.sqlalchemy.org/en/latest/', None),274 'wtforms': ('https://wtforms.readthedocs.io/en/latest/', None),275 'blinker': ('https://pythonhosted.org/blinker/', None),276}277278html_theme_options = {279 'touch_icon': 'touch-icon.png'280}281282# unwrap decorators99def unwrap_decorators():100 import sphinx.util.inspect as inspect101 import functools102
8 unmodified lines
111 rv._original_function = wrapped112 return rv113 functools.update_wrapper = update_wrapper114115116unwrap_decorators()117del unwrap_decorators118119303def setup(app):304 def cut_module_meta(app, what, name, obj, options, lines):305 """Remove metadata from autodoc output."""306 if what != 'module':307 return120_internal_mark_re = re.compile(r'^\s*:internal:\s*$(?m)', re.M)121309 lines[:] = [310 line for line in lines311 if not line.startswith((':copyright:', ':license:'))312 ]122314 app.connect('autodoc-process-docstring', cut_module_meta)123def skip_internal(app, what, name, obj, skip, options):124 docstring = inspect.getdoc(obj) or ''125316 def github_link(317 name, rawtext, text, lineno, inliner,318 options=None, content=None319 ):320 app = inliner.document.settings.env.app321 release = app.config.release322 base_url = 'https://github.com/pallets/flask/tree/'126 if skip or _internal_mark_re.search(docstring) is not None:127 return True128324 if text.endswith('>'):325 words, text = text[:-1].rsplit('<', 1)326 words = words.strip()327 else:328 words = None129330 if release.endswith('dev'):331 url = '{0}master/{1}'.format(base_url, text)332 else:333 url = '{0}{1}/{2}'.format(base_url, release, text)130def cut_module_meta(app, what, name, obj, options, lines):131 """Remove metadata from autodoc output."""132 if what != 'module':133 return134335 if words is None:336 words = url135 lines[:] = [136 line for line in lines137 if not line.startswith((':copyright:', ':license:'))138 ]139338 from docutils.nodes import reference339 from docutils.parsers.rst.roles import set_classes340 options = options or {}341 set_classes(options)342 node = reference(rawtext, words, refuri=url, **options)343 return [node], []140141def github_link(142 name, rawtext, text, lineno, inliner, options=None, content=None143):144 app = inliner.document.settings.env.app145 release = app.config.release146 base_url = 'https://github.com/pallets/flask/tree/'147148 if text.endswith('>'):149 words, text = text[:-1].rsplit('<', 1)150 words = words.strip()151 else:152 words = None153154 if release.endswith('dev'):155 url = '{0}master/{1}'.format(base_url, text)156 else:157 url = '{0}{1}/{2}'.format(base_url, release, text)158159 if words is None:160 words = url161162 from docutils.nodes import reference163 from docutils.parsers.rst.roles import set_classes164 options = options or {}165 set_classes(options)166 node = reference(rawtext, words, refuri=url, **options)167 return [node], []168169170def setup(app):171 app.connect('autodoc-skip-member', skip_internal)172 app.connect('autodoc-process-docstring', cut_module_meta)173 app.add_role('gh', github_link)
modified:docs/extensiondev.rst+3 added-2 removed
326 unmodified lines
327 *ExtensionName-Flask*.3286. Approved extensions must define all their dependencies in the329 :file:`setup.py` file unless a dependency cannot be met because it is not330 available on PyPI.3317. The extension must have documentation that uses one of the two Flask332 themes for Sphinx documentation.3317. The documentation must use the ``flask`` theme from the `Official332 Pallets Themes`_.3338. The setup.py description (and thus the PyPI description) has to334 link to the documentation, website (if there is one) and there335 must be a link to automatically install the development version336 (``PackageName==dev``).
4 unmodified lines
341342.. _OAuth extension: https://pythonhosted.org/Flask-OAuth/343.. _mailinglist: http://flask.pocoo.org/mailinglist/344.. _IRC channel: http://flask.pocoo.org/community/irc/345.. _Official Pallets Themes: https://pypi.org/project/pallets-sphinx-themes/
modified:docs/extensions.rst+1 added-1 removed
48 unmodified lines
49extension.505152.. _Extension Registry: http://flask.pocoo.org/extensions/53.. _pypi: https://pypi.python.org/pypi?:action=browse&c=58553.. _pypi: https://pypi.org/search/?c=Framework+%3A%3A+Flask
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)
modified:docs/index.rst+2 added-2 removed
3 unmodified lines
4================56.. image:: _static/logo-full.png7 :alt: Flask: web development, one drop at a time8 :class: floatingflask8 :align: right910Welcome to Flask's documentation. Get started with :ref:`installation`11and then get an overview with the :ref:`quickstart`. There is also a12more detailed :ref:`tutorial` that shows how to create a small but13complete application with Flask. Common patterns are described in the14:ref:`patterns` section. The rest of the docs desribe each component of14:ref:`patterns` section. The rest of the docs describe each component of15Flask in detail, with a full reference in the :ref:`api` section.1617Flask depends on the `Jinja`_ template engine and the `Werkzeug`_ WSGI18toolkit. The documentation for these libraries can be found at:
8 unmodified lines
modified:docs/installation.rst+1 added-1 removed
25 unmodified lines
26 the ``flask`` command and allows adding custom management commands.2728.. _Werkzeug: http://werkzeug.pocoo.org/29.. _Jinja: http://jinja.pocoo.org/30.. _MarkupSafe: https://pypi.python.org/pypi/MarkupSafe30.. _MarkupSafe: https://pypi.org/project/MarkupSafe/31.. _ItsDangerous: https://pythonhosted.org/itsdangerous/32.. _Click: http://click.pocoo.org/3334Optional dependencies
149 unmodified lines
modified:docs/make.bat+36 added-139 removed
1@ECHO OFF23REM Command file for Sphinx documentation45if "%SPHINXBUILD%" == "" (6 set SPHINXBUILD=sphinx-build7)8set BUILDDIR=_build9set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% .10if NOT "%PAPER%" == "" (11 set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%12)1314if "%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%/html43 echo.44 echo.Build finished. The HTML pages are in %BUILDDIR%/html.45 goto end46)4748if "%1" == "dirhtml" (49 %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml50 echo.51 echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.52 goto end53)5455if "%1" == "singlehtml" (56 %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml57 echo.58 echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml.59 goto end60)6162if "%1" == "pickle" (63 %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle64 echo.65 echo.Build finished; now you can process the pickle files.66 goto end67)6869if "%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)138139:end1@ECHO OFF23pushd %~dp045REM Command file for Sphinx documentation67if "%SPHINXBUILD%" == "" (8 set SPHINXBUILD=sphinx-build9)10set SOURCEDIR=.11set BUILDDIR=_build12set SPHINXPROJ=Flask1314if "%1" == "" goto help1516%SPHINXBUILD% >NUL 2>NUL17if errorlevel 9009 (18 echo.19 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.24 echo.If you don't have Sphinx installed, grab it from25 echo.http://sphinx-doc.org/26 exit /b 127)2829%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%30goto end3132:help33%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%3435: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:flask/cli.py+1 added-1 removed
241 unmodified lines
242 '\n\n{tb}'.format(name=module_name, tb=traceback.format_exc())243 )244 elif raise_if_not_found:245 raise NoAppException(246 'Could not import "{name}"."'.format(name=module_name)246 'Could not import "{name}".'.format(name=module_name)247 )248 else:249 return250
640 unmodified lines
modified:flask/helpers.py+1 added-1 removed
484 unmodified lines
485 .. versionchanged:: 0.12486 The `attachment_filename` is preferred over `filename` for MIME-type487 detection.488489 .. versionchanged:: 0.13489 .. versionchanged:: 1.0490 UTF-8 filenames, as specified in `RFC 2231`_, are supported.491492 .. _RFC 2231: https://tools.ietf.org/html/rfc2231#section-4493
536 unmodified lines
modified:.gitignore+1 added
12 unmodified lines
13.tox/14.cache/15.pytest_cache/16.idea/17docs/_build/1819# Coverage reports20htmlcov/21.coverage
2 unmodified lines
modified:CHANGES.rst+1 added-1 removed
709 unmodified lines
710- modules can now register for a subdomain instead of just an URL711 prefix. This makes it possible to bind a whole module to a712 configurable subdomain.713714.. _blinker: https://pypi.python.org/pypi/blinker714.. _blinker: https://pypi.org/project/blinker/715716Version 0.5.2717-------------718
106 unmodified lines
modified:setup.py+7 added
36 unmodified lines
37 'pytest>=3',38 'coverage',39 'tox',40 'sphinx',41 'pallets-sphinx-themes',42 'sphinxcontrib-log-cabinet',43 ],44 'docs': [45 'sphinx',46 'pallets-sphinx-themes',47 'sphinxcontrib-log-cabinet',48 ]49 },50 classifiers=[51 'Development Status :: 5 - Production/Stable',52 'Environment :: Web Environment',
22 unmodified lines
modified:tox.ini+8 added-2 removed
36 unmodified lines
37 # pytest-cov doesn't seem to play nice with -p38 coverage run -p -m pytest tests examples3940[testenv:docs-html]41deps = sphinx41deps =42 sphinx43 pallets-sphinx-themes44 sphinxcontrib-log-cabinet45commands = sphinx-build -W -b html -d {envtmpdir}/doctrees docs {envtmpdir}/html4647[testenv:docs-linkcheck]45deps = sphinx48deps =49 sphinx50 pallets-sphinx-themes51 sphinxcontrib-log-cabinet52commands = sphinx-build -W -b linkcheck -d {envtmpdir}/doctrees docs {envtmpdir}/linkcheck5354[testenv:coverage-report]55deps = coverage
14 unmodified lines