forked from orbit-oss/flask
fix some warnings while building docs
This commit is contained in:
parent
be2abd2926
commit
317d60307d
3 changed files with 21 additions and 18 deletions
29
docs/conf.py
29
docs/conf.py
|
|
@ -10,7 +10,7 @@
|
||||||
#
|
#
|
||||||
# All configuration values have a default; values that are commented out
|
# All configuration values have a default; values that are commented out
|
||||||
# serve to show the default.
|
# serve to show the default.
|
||||||
|
from __future__ import print_function
|
||||||
import sys, os
|
import sys, os
|
||||||
|
|
||||||
# If extensions (or modules to document with autodoc) are in another directory,
|
# If extensions (or modules to document with autodoc) are in another directory,
|
||||||
|
|
@ -26,8 +26,11 @@ sys.path.append(os.path.abspath('.'))
|
||||||
|
|
||||||
# Add any Sphinx extension module names here, as strings. They can be extensions
|
# Add any Sphinx extension module names here, as strings. They can be extensions
|
||||||
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
|
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
|
||||||
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx',
|
extensions = [
|
||||||
'flaskdocext']
|
'sphinx.ext.autodoc',
|
||||||
|
'sphinx.ext.intersphinx',
|
||||||
|
'flaskdocext'
|
||||||
|
]
|
||||||
|
|
||||||
# Add any paths that contain templates here, relative to this directory.
|
# Add any paths that contain templates here, relative to this directory.
|
||||||
templates_path = ['_templates']
|
templates_path = ['_templates']
|
||||||
|
|
@ -52,10 +55,8 @@ import pkg_resources
|
||||||
try:
|
try:
|
||||||
release = pkg_resources.get_distribution('Flask').version
|
release = pkg_resources.get_distribution('Flask').version
|
||||||
except pkg_resources.DistributionNotFound:
|
except pkg_resources.DistributionNotFound:
|
||||||
print 'To build the documentation, The distribution information of Flask'
|
print('Flask must be installed to build the documentation.')
|
||||||
print 'Has to be available. Either install the package into your'
|
print('Install from source using `pip install -e .` in a virtualenv.')
|
||||||
print 'development environment or run "setup.py develop" to setup the'
|
|
||||||
print 'metadata. A virtualenv is recommended!'
|
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
del pkg_resources
|
del pkg_resources
|
||||||
|
|
||||||
|
|
@ -258,13 +259,13 @@ pygments_style = 'flask_theme_support.FlaskyStyle'
|
||||||
# fall back if theme is not there
|
# fall back if theme is not there
|
||||||
try:
|
try:
|
||||||
__import__('flask_theme_support')
|
__import__('flask_theme_support')
|
||||||
except ImportError, e:
|
except ImportError as e:
|
||||||
print '-' * 74
|
print('-' * 74)
|
||||||
print 'Warning: Flask themes unavailable. Building with default theme'
|
print('Warning: Flask themes unavailable. Building with default theme')
|
||||||
print 'If you want the Flask themes, run this command and build again:'
|
print('If you want the Flask themes, run this command and build again:')
|
||||||
print
|
print()
|
||||||
print ' git submodule update --init'
|
print(' git submodule update --init')
|
||||||
print '-' * 74
|
print('-' * 74)
|
||||||
|
|
||||||
pygments_style = 'tango'
|
pygments_style = 'tango'
|
||||||
html_theme = 'default'
|
html_theme = 'default'
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
.. _extensions:
|
||||||
|
|
||||||
Flask Extensions
|
Flask Extensions
|
||||||
================
|
================
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ Version 1.0
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
Debugging
|
Debugging
|
||||||
+++++++++
|
`````````
|
||||||
|
|
||||||
Flask 1.0 removed the ``debug_log_format`` attribute from Flask
|
Flask 1.0 removed the ``debug_log_format`` attribute from Flask
|
||||||
applications. Instead the new ``LOGGER_HANDLER_POLICY`` configuration can
|
applications. Instead the new ``LOGGER_HANDLER_POLICY`` configuration can
|
||||||
|
|
@ -33,7 +33,7 @@ be used to disable the default log handlers and custom log handlers can be
|
||||||
set up.
|
set up.
|
||||||
|
|
||||||
Error handling
|
Error handling
|
||||||
++++++++++++++
|
``````````````
|
||||||
|
|
||||||
The behavior of error handlers was changed.
|
The behavior of error handlers was changed.
|
||||||
The precedence of handlers used to be based on the decoration/call order of
|
The precedence of handlers used to be based on the decoration/call order of
|
||||||
|
|
@ -53,14 +53,14 @@ Trying to register a handler on an instance now raises :exc:`ValueError`.
|
||||||
handlers only using exception classes and HTTP error codes.
|
handlers only using exception classes and HTTP error codes.
|
||||||
|
|
||||||
Templating
|
Templating
|
||||||
++++++++++
|
``````````
|
||||||
|
|
||||||
The :func:`~flask.templating.render_template_string` function has changed to
|
The :func:`~flask.templating.render_template_string` function has changed to
|
||||||
autoescape template variables by default. This better matches the behavior
|
autoescape template variables by default. This better matches the behavior
|
||||||
of :func:`~flask.templating.render_template`.
|
of :func:`~flask.templating.render_template`.
|
||||||
|
|
||||||
Extension imports
|
Extension imports
|
||||||
+++++++++++++++++
|
`````````````````
|
||||||
|
|
||||||
Extension imports of the form ``flask.ext.foo`` are deprecated, you should use
|
Extension imports of the form ``flask.ext.foo`` are deprecated, you should use
|
||||||
``flask_foo``.
|
``flask_foo``.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue