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
Provenance
- Commit
79aa4ac- Tree
280094f- Author
Armin Ronacher <armin.ronacher@active-4.com>- Committer
Armin Ronacher <armin.ronacher@active-4.com>- Parent 1
4d2c818- Parent 2
c240a1f
5 files changed+23 added−7 removed
modified:docs/patterns/templateinheritance.rst+1 added-1 removed
36 unmodified lines37 </div>38 </body>39 40 In this example, the ``{% block %}`` tags define four blocks that child templates41-can fill in. All the `block` tag does is to tell the template engine that a41+can fill in. All the `block` tag does is tell the template engine that a42 child template may override those portions of the template.43 44 Child Template45 --------------24 unmodified linesmodified:docs/tutorial/dbcon.rst+16 added
37 unmodified lines38 environments. That special :data:`~flask.g` object does some magic behind39 the scenes to ensure it does the right thing.40 41 Continue to :ref:`tutorial-views`.42+43+.. hint:: Where do I put this code?44+45+ 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).50+51+ 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.55+56+.. _example source:57+ http://github.com/mitsuhiko/flask/tree/master/examples/flaskr/modified:flask/app.py+4 added-3 removed
546 unmodified lines547 :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 lines1264 return RequestContext(self, environ)1265 1266 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 linesmodified:flask/helpers.py+1 added-1 removed
419 unmodified lines420 content = fd.read() # Read and process the file content...421 422 :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 linesmodified:README+1 added-2 removed
1-1 // Flask //2 3 web development, one drop at a time4 1 unmodified line6 ~ What is Flask?7 8 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.11 12 ~ Is it ready?13 14 A preview release is out now, and I'm hoping for some21 unmodified lines