Skip to content
Myr

Merge branch 'master' of github.com:mitsuhiko/flask

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

authored by Armin Ronacher · committed by Armin Ronacher · parents 4d2c818, c240a1f · Browse files · 5 files+23 added−7 removed
This commit

State

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

Diff stats

5 files+23 added−7 removed

  • other:+23 added−7 removed

5 files+23 added−7 removed

modified:docs/patterns/templateinheritance.rst+1 added-1 removed
36 unmodified lines
37 </div>38 </body>3940In this example, the ``{% block %}`` tags define four blocks that child templates41can fill in. All the `block` tag does is to tell the template engine that a41can fill in. All the `block` tag does is tell the template engine that a42child template may override those portions of the template.4344Child Template45--------------
24 unmodified lines
modified:docs/tutorial/dbcon.rst+16 added
37 unmodified lines
38environments. That special :data:`~flask.g` object does some magic behind39the scenes to ensure it does the right thing.4041Continue to :ref:`tutorial-views`.4243.. hint:: Where do I put this code?4445 If you've been following along in this tutorial, you might be wondering46 where to put the code from this step and the next. A logical place is to47 group these module-level functions together, and put your new48 ``before_request`` and ``teardown_request`` functions below your existing49 ``init_db`` function (following the tutorial line-by-line).5051 If you need a moment to find your bearings, take a look at how the `example52 source`_ is organized. In Flask, you can put all of your application code53 into a single Python module. You don't have to, and if your app :ref:`grows54 larger <larger-applications>`, it's a good idea not to.5556.. _example source:57 http://github.com/mitsuhiko/flask/tree/master/examples/flaskr/
modified:flask/app.py+4 added-3 removed
546 unmodified lines
547 :param host: the hostname to listen on. set this to ``'0.0.0.0'``548 to have the server available externally as well.549 :param port: the port of the webserver550 :param options: the options to be forwarded to the underlying551 Werkzeug server. See :func:`werkzeug.run_simple`552 for more information.551 Werkzeug server. See552 :func:`werkzeug.serving.run_simple` for more553 information.554 """555 from werkzeug.serving import run_simple556 if 'debug' in options:557 self.debug = options.pop('debug')
706 unmodified lines
1264 return RequestContext(self, environ)12651266 def test_request_context(self, *args, **kwargs):1267 """Creates a WSGI environment from the given values (see1267 :func:`werkzeug.create_environ` for more information, this1268 :func:`werkzeug.test.EnvironBuilder` for more information, this1269 function accepts the same arguments).1270 """1271 from werkzeug.test import create_environ1272 environ_overrides = kwargs.setdefault('environ_overrides', {})
54 unmodified lines
modified:flask/helpers.py+1 added-1 removed
419 unmodified lines
420 content = fd.read() # Read and process the file content...421422 :param directory: the base directory.423 :param filename: the untrusted filename relative to that directory.424 :raises: :class:`~werkzeug.exceptions.NotFound` if the retsulting path424 :raises: :class:`~werkzeug.exceptions.NotFound` if the resulting path425 would fall out of `directory`.426 """427 filename = posixpath.normpath(filename)428 for sep in _os_alt_seps:
162 unmodified lines
modified:README+1 added-2 removed
11 // Flask //23 web development, one drop at a time4
1 unmodified line
6 ~ What is Flask?78 Flask is a microframework for Python based on Werkzeug9 and Jinja2. It's intended for small scale applications11 and was developped with best intentions in mind.10 and was developed with best intentions in mind.1112 ~ Is it ready?1314 A preview release is out now, and I'm hoping for some
21 unmodified lines