Skip to content

Commit 26e748c

Browse files
committed
Merge branch 'master' of github.com:mitsuhiko/flask
2 parents 04f2bbc + 46ecc57 commit 26e748c

File tree

6 files changed

+12
-296
lines changed

6 files changed

+12
-296
lines changed

docs/patterns/fabric.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ virtual environment::
4848

4949
def deploy():
5050
# figure out the release name and version
51-
dist = local('python setup.py --fullname').strip()
51+
dist = local('python setup.py --fullname', capture=True).strip()
5252
# upload the source tarball to the temporary folder on the server
5353
put('dist/%s.tar.gz' % dist, '/tmp/yourapplication.tar.gz')
5454
# create a place where we can unzip the tarball, then enter

docs/patterns/jquery.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Loading jQuery
2323
In order to use jQuery, you have to download it first and place it in the
2424
static folder of your application and then ensure it's loaded. Ideally
2525
you have a layout template that is used for all pages where you just have
26-
to add a script statement to your `head` to load jQuery:
26+
to add a script statement to the bottom of your `<body>` to load jQuery:
2727

2828
.. sourcecode:: html
2929

@@ -35,15 +35,15 @@ Another method is using Google's `AJAX Libraries API
3535

3636
.. sourcecode:: html
3737

38-
<script type=text/javascript
39-
src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
38+
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.js"></script>
39+
<script>window.jQuery || document.write('<script src="{{
40+
url_for('static', filename='jquery.js') }}">\x3C/script>')</script>
4041

41-
In this case you don't have to put jQuery into your static folder, it will
42-
instead be loaded from Google directly. This has the advantage that your
42+
In this case you have to put jQuery into your static folder as a fallback, but it will
43+
first try to load it directly from Google. This has the advantage that your
4344
website will probably load faster for users if they went to at least one
4445
other website before using the same jQuery version from Google because it
45-
will already be in the browser cache. Downside is that if you don't have
46-
network connectivity during development jQuery will not load.
46+
will already be in the browser cache.
4747

4848
Where is My Site?
4949
-----------------

extreview/approved.rst

Lines changed: 0 additions & 168 deletions
This file was deleted.

extreview/listed.rst

Lines changed: 0 additions & 64 deletions
This file was deleted.

extreview/unlisted.rst

Lines changed: 0 additions & 55 deletions
This file was deleted.

flask/helpers.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,10 @@ def send_file(filename_or_fp, mimetype=None, as_attachment=False,
379379
rv.set_etag('flask-%s-%s-%s' % (
380380
os.path.getmtime(filename),
381381
os.path.getsize(filename),
382-
adler32(filename) & 0xffffffff
382+
adler32(
383+
filename.encode('utf8') if isinstance(filename, unicode)
384+
else filename
385+
) & 0xffffffff
383386
))
384387
if conditional:
385388
rv = rv.make_conditional(request)

0 commit comments

Comments
 (0)