diff --git a/docs/conf.py b/docs/conf.py index 5127a66c16..f9f7867e02 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -190,6 +190,7 @@ 'pointsize': '12pt', 'preamble': r'\usepackage{flaskstyle}' } +latex_use_parts = True latex_additional_files = ['flaskstyle.sty', 'logo.pdf'] diff --git a/docs/contents.rst.inc b/docs/contents.rst.inc deleted file mode 100644 index 2e3411079e..0000000000 --- a/docs/contents.rst.inc +++ /dev/null @@ -1,42 +0,0 @@ -User's Guide ------------- - -This part of the documentation is written text and should give you an idea -how to work with Flask. It's a series of step-by-step instructions for -web development. - -.. toctree:: - :maxdepth: 2 - - foreword - installation - quickstart - tutorial/index - testing - errorhandling - patterns/index - deploying/index - becomingbig - -API Reference -------------- - -If you are looking for information on a specific function, class or -method, this part of the documentation is for you: - -.. toctree:: - :maxdepth: 2 - - api - -Additional Notes ----------------- - -Design notes, legal information and changelog are here for the interested: - -.. toctree:: - :maxdepth: 2 - - design - license - changelog diff --git a/docs/errorhandling.rst b/docs/errorhandling.rst index 82ed3b6cb0..dcc2a2e930 100644 --- a/docs/errorhandling.rst +++ b/docs/errorhandling.rst @@ -163,6 +163,8 @@ Here is a list of useful formatting variables for the format string. Note that this list is not complete, consult the official documentation of the :mod:`logging` package for a full list. +.. tabularcolumns:: |p{3cm}|p{12cm}| + +------------------+----------------------------------------------------+ | Format | Description | +==================+====================================================+ diff --git a/docs/flaskstyle.sty b/docs/flaskstyle.sty index 71d9ccc789..1d870050b7 100644 --- a/docs/flaskstyle.sty +++ b/docs/flaskstyle.sty @@ -70,4 +70,13 @@ \ChNumVar{\raggedleft \bfseries\Large} \ChTitleVar{\raggedleft \rm\Huge} +% use inconsolata font \usepackage{inconsolata} + +% fix single quotes, for inconsolata. (does not work) +%%\usepackage{textcomp} +%%\begingroup +%% \catcode`'=\active +%% \g@addto@macro\@noligs{\let'\textsinglequote} +%% \endgroup +%%\endinput diff --git a/docs/index.rst b/docs/index.rst index 2c3159c747..f2270422e0 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,3 +1,5 @@ +:orphan: + Welcome to Flask ================ @@ -25,4 +27,45 @@ following links: .. _Jinja2: http://jinja.pocoo.org/2/ .. _Werkzeug: http://werkzeug.pocoo.org/ -.. include:: contents.rst.inc +User's Guide +------------ + +This part of the documentation is written text and should give you an idea +how to work with Flask. It's a series of step-by-step instructions for +web development. + +.. toctree:: + :maxdepth: 2 + + foreword + installation + quickstart + tutorial/index + testing + errorhandling + patterns/index + deploying/index + becomingbig + +API Reference +------------- + +If you are looking for information on a specific function, class or +method, this part of the documentation is for you: + +.. toctree:: + :maxdepth: 2 + + api + +Additional Notes +---------------- + +Design notes, legal information and changelog are here for the interested: + +.. toctree:: + :maxdepth: 2 + + design + license + changelog diff --git a/docs/latexindex.rst b/docs/latexindex.rst index 0b611b4592..a4aa0b4a20 100644 --- a/docs/latexindex.rst +++ b/docs/latexindex.rst @@ -1,4 +1,38 @@ +:orphan: + Flask Documentation =================== -.. include:: contents.rst.inc +User's Guide +------------ + +.. toctree:: + :maxdepth: 3 + + foreword + installation + quickstart + tutorial/index + testing + errorhandling + patterns/index + deploying/index + becomingbig + +API Reference +------------- + +.. toctree:: + :maxdepth: 3 + + api + +Additional Notes +---------------- + +.. toctree:: + :maxdepth: 3 + + design + license + changelog diff --git a/flask.py b/flask.py index 9a919f7f0a..ea3fcaa039 100644 --- a/flask.py +++ b/flask.py @@ -1097,6 +1097,8 @@ def make_response(self, rv): The following types are allowed for `rv`: + .. tabularcolumns:: |p{3.5cm}|p{9.5cm}| + ======================= =========================================== :attr:`response_class` the object is returned unchanged :class:`str` a response object is created with the @@ -1222,3 +1224,8 @@ def __call__(self, environ, start_response): request = LocalProxy(lambda: _request_ctx_stack.top.request) session = LocalProxy(lambda: _request_ctx_stack.top.session) g = LocalProxy(lambda: _request_ctx_stack.top.g) + + +# script interface to run a development server +if __name__ == '__main__': + sys.exit(main(sys.argv))