Commit Graph

2664 Commits

Author SHA1 Message Date
Tery Lim ec9717502f Update errorhandling.rst (#2075)
Fix LogRecord class reference.
2016-11-01 21:04:20 -07:00
Tery Lim bbe58a4944 Update errorhandling.rst (#2074) 2016-11-01 19:58:22 -07:00
Shandy Brown 9685d14eaa Correct grammar (#2061) 2016-11-01 18:52:54 -07:00
Clenimar Filemon 77af942b98 Capitalize occurrences of 'flask' (#2067) 2016-11-01 18:52:32 -07:00
Philippe Ombredanne 11809bf1d2 Add license_file to setup.cfg metadata (#2024)
Without this, the LICENSE file is never included in the built wheels: this makes it harder for users to comply with the license.
With this addition a file LICENSE.txt will be created in the `xxx.dist-info` directory with the content of the `license_file` file, e.g. the top level LICENSE.
2016-11-01 13:11:53 -07:00
Martijn Pieters de1652467b Remove busy-work. (#2072)
It is entirely sufficient to walk the MRO of the exception class, no need to check for classes re-appearing later on, no need to add the MRO of any superclass.

* Python refuses point-blank to create a class with a circular MRO.
* All classes in a superclass MRO *already* appear in the MRO of the derived type. Re-adding the contents of a superclass MRO is doing double work.
2016-11-01 07:35:17 -07:00
Alex Kahan 6478d7bb99 Adding coverage generation to tox (#2071)
* Adding coverage generation to tox

* Removing test directory from coverage command

* Adding back  to pytest command
2016-10-31 23:10:27 +01:00
Clenimar Filemon cb30a3b562 Update docstring for errorhandler() (#2070) 2016-10-31 17:41:38 +01:00
Markus Unterwaditzer 2b8fef4fe7 Merge branch '0.11-maintenance' 2016-10-30 14:35:15 +01:00
Kyle Lawlor fa087c8929 Fixes import statement in flaskr (#2068)
- `from flaskr.flaskr import app` in flaskr/__init__.py
  causes an import error with Python 2
- The relative import now used works for py2 and py3
2016-10-30 14:34:49 +01:00
Ionuț Ciocîrlan 2cc76628d2 Fix grammar in docs 2016-10-24 13:20:54 +02:00
Cody d25c801a3b add 'caution' section to docs, workaround for zero-padded file modes (#2057)
Fix #2029
2016-10-14 10:13:42 +02:00
David Lord cdbd63d7de Windows venv is Scripts, capital S
closes #2056
2016-10-12 12:14:49 -07:00
Michael Recachinas bd5e297aa9 Default environ (#2047)
* Add init to FlaskClient

This addresses #1467. The init in the subclass
can now take in `environ_base`, which will then get
passed to `make_test_environ_builder` and to
`EnvironBuilder` via keyword args.

This should provide the default environment capability
on `app.test_client()` init.

* Add kwarg `environ_base` to `make_test_environ_builder` call

This change now passes `environ_base` from either
`kwargs` in `FlaskClient.open` or `FlaskClient.environ_base`
if passed into the init.

* Fix assignment reference typo

* Add default `environ_base` to `FlaskClient.__init__`

* Set default kwargs for `environ_base` in `FlaskClient.open`

* Remove specific environ_base kwarg since its in kwargs

* Add docstring to FlaskClient detailing environ_base

* Document app.test_client default environ in CHANGES

* Re-word environ_base changes in FlaskClient docstring

* Add client.environ_base tests

* Mention preset default environ in `app.test_client`

* Add versionchanged directive to docstring in FlaskClient
2016-10-12 08:54:24 +02:00
Hassam cd13a5cf62 Fix #2051: Fix flaskr import in flaskr/__init__.py (#2052) 2016-10-08 20:34:56 +02:00
Michael Recachinas 49ecc88d99 Remove `-a/--app` from Quickstart documentation (#2046)
* Remove `-a/--app` from Quickstart documentation

As mentioned in #2009, simplifying the CLI saw the removal of the `-a/--app` flag. Therefore, the only way to specify the module to import is by setting `FLASK_APP`.

* Remove misleading `either` from CLI help

The CLI help details how to run the application, but still uses the phrasing "either through the `FLASK_APP`...". This likely is an artifact from when `-a/--app` was still present in the CLI.
2016-10-01 18:45:22 +02:00
Joël Charles 7186a5aaf5 make use of range requests if available in werkzeug (#2031)
* make use of range requests if available in werkzeug

* different logic for testing werkzeug functionality
2016-09-26 12:43:46 +02:00
小明 f3d661de66 Fix unbound error (#2039) 2016-09-25 18:25:54 +02:00
Douglas Thor a6a36ec72a Updated mod_wsgi.rst to point to new mod_wsgi repo (#2038) 2016-09-24 13:07:19 +02:00
Markus Unterwaditzer 01081dbe6c Avoid always-false statement
See https://github.com/pallets/flask/pull/1849/files#r79371299
2016-09-19 23:30:24 +02:00
Benjamin Dopplinger dbeed24067 Fix typo in MethodView doc (#2028) 2016-09-18 20:24:46 -07:00
Markus Unterwaditzer dcfdfc6476 Use abort docs from Werkzeug
Fix #1960
2016-09-18 15:47:52 +02:00
Bruno Thalmann 09fec941f4 Removed unused import. (#2026) 2016-09-18 14:10:00 +02:00
Andrew Arendt 270355abdc Remove nonsense from cli docs 2016-09-14 20:03:21 +02:00
Armin Ronacher 0664a3f2dd Set merge strategy for CHANGES 2016-09-12 21:55:17 +03:00
Armin Ronacher 83fd5b26b8 Merge branch 'feature/logger-propagation' 2016-09-12 21:54:41 +03:00
Armin Ronacher a40489e0ce Merge pull request #2019 from pallets/bugfix/sendfile-error
Do not cause errors for unknown files for sendfile
2016-09-12 21:52:42 +03:00
Markus Unterwaditzer 3bd12b38a8 Merge pull request #2022 from pablogamboa/patch-1
Fix typo in docs
2016-09-12 10:42:23 +02:00
Pablo Marti 2b47615998 Fix typo in docs
Also added one missing comma for readability
2016-09-12 08:41:09 +01:00
Armin Ronacher 11f3a3f6dd Updated upgrade docs 2016-09-11 21:28:30 +03:00
Markus Unterwaditzer 12008c2e63 Merge branch '0.11-maintenance' 2016-09-11 17:55:33 +02:00
Kyle Lawlor 59104db2f2 Address #1980 (#2021)
* Distinguish between directories and files

* Convert larger apps to make use of setup.py

- replaces runserver.py with setup.py
- example now runs with recommended structure

* Fixes a typo and formats the added paragraph
2016-09-11 17:53:35 +02:00
Armin Ronacher 1f0ca894a2 Killed now dead code 2016-09-11 16:57:43 +03:00
Armin Ronacher 9e41eca7f8 Merge pull request #2013 from pallets/bugfix/error-handler-error-handler
Corrected after response for error handlers
2016-09-10 03:36:29 +03:00
Armin Ronacher a30951ec28 Do not error for unknown files if send_file sends an actual file 2016-09-10 03:33:53 +03:00
Andrew Arendt c54c538c11 fixed deprecated syntax in setup.cfg (#2015) 2016-09-08 19:24:07 +02:00
Akbar Ibrahim c687ffb192 Fixed error in errorhandler doc string. (#2014) 2016-09-08 17:34:51 +02:00
Markus Unterwaditzer 7132feb1a5 Merge branch '0.11-maintenance' 2016-09-08 15:21:05 +02:00
Kyle Lawlor e6f9d2b414 Clean up tutorial docs for installable app pattern with flaskr (#2002)
* Clean up tutorial docs for installable app pattern

- reading sequentially through the tutorial works.
- fixes references to `export FLASK_APP=flaskr.flaskr`

* Fixes titles for each section of flaskr tutorial

* Revert grammar

* Emphasize the Packaging Guide

- adds more general packaging resource
- removes the emphasis put on setuptools

* rephrase and remove note admonitions

- expanded on few points
- removed note blocks, they are unneccessary

* Remove note about reinstalling to update cli

- I had mistakenly thought it was necessary to
  re-install the app to update the cli.
- the `--editable` flag detects the change and
  the cli updates without issue.
2016-09-08 15:19:48 +02:00
Armin Ronacher 9cd32cac32 Corrected after response for error handlers
Before this change after request functions were not correctly
invoked for error handlers.
2016-09-08 11:56:02 +03:00
Markus Unterwaditzer dbcd64e2ee Changelog for #2006 2016-09-07 18:19:10 +02:00
Markus Unterwaditzer c4ec6954e5 Don't passthrough_errors unless instructed. (#2006)
Fix #2005

Revert #1679 and #1996
2016-09-06 22:32:34 +02:00
Afonso Queirós ccd02bfe8c Correcting Custom Test Client class docs (#2004) 2016-09-05 16:57:00 +02:00
Roman 92ce20eeac Fix error in send_file helper (#2003)
* Fix error in send_file (mimetype_filename is not defined)

* fix formatting error message in send_file
2016-09-04 16:28:05 -07:00
PHeanEX 96b6345c1a Fix small grammar error (Of/Or) (#2001) 2016-08-31 13:05:12 -07:00
Kyle Lawlor b42e43e3b6 Better workflow for flaskr and other basic apps (#2000)
- adds `from flaskr import app` to top-level in flaskr module
- effect is that `export FLASK_APP=flaskr` works over the more verbose
  `export FLASK_APP=flaskr.flask`
- see the readme for how to run
- all tests are passing with `py.test` or `python setup.py test` (in
  venv)
2016-08-31 18:37:36 +02:00
Josh Soref 6e6c3a4636 Spelling (#1998)
* spelling: cacheability

* spelling: conceptually

* spelling: javascript

* spelling: reset

* spelling: raised

* comma: instead..., they...
2016-08-30 00:26:20 +02:00
dawran6 3d856e03fc sessions documentation (client side vs server side) #434 (#1888)
Mention the existence of Flask extentions that handle server-side
sessions.
Attempt to improve the reading flow.
2016-08-29 00:06:53 +02:00
Markus Unterwaditzer 78a71a48dc Merge pull request #1996 from untitaker/propagate-exceptions-werkzeug
Only passthrough_errors if PROPAGATE_EXCEPTIONS
2016-08-27 18:33:08 +02:00
Markus Unterwaditzer 098ea0c8ca Only passthrough_errors if PROPAGATE_EXCEPTIONS
See pallets/werkzeug#954
2016-08-27 14:38:13 +02:00