Commit graph

2473 commits

Author SHA1 Message Date
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
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
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
Kyle Lawlor
5f009374fd Update minitwit & improve testing for examples (#1954)
* Update minitwit & improve testing for examples

* Related to #1945
* Re-works minitwit to be installed and run as:

    pip install --editable .
    export FLASK_APP=minitwit.minitwit
    export FLASK_DEBUG=1
    flask initdb
    flask run

* added flaskr and minitwit to norecursedirs
  * tests not properly run when using pytest standards
  * see: http://stackoverflow.com/questions/38313171/configuring-pytest-with-installable-examples-in-a-project
* Both flaskr and minitwit now follow pytest standards.
* Tests can for them as `py.test` or `python setup.py test`

* Update minitwit readme

* updates the instructions for running

* Fixes for updating the minitwit example

- This reverts the changes to the *docs/* (I will file separate PR).
- Running the app is now: `export FLASK_APP=minitwit` & `flask run`
  (After installing the app)

* Remove unnecessary comma from flaskr/setup.py
2016-08-22 20:52:54 +02:00
David Lord
1e5746bb2b persona is discontinued, remove example
closes #1947
2016-07-06 08:02:13 -07:00
Kyle Lawlor
17d4cb3828 Address #1902: Converts example/flaskr to have a setup.py (#1945)
* Converts example/flaskr to have a setup.py

Makes the flaskr app easier to run, ex. workflow:
- pip install --editable .
- export FLASK_APP=flaskr.flaskr
- flask initdb
- flask run

Testing is also easier now:
- python setup.py test

* Fixed an import error in flaskr/tests

- the statement `import flaskr` caused errors in python3
- `from . import flaskr` fixes the issue in 2.7.11 and 3.5.1

* Better project structure and updates the docs

- Re-factors *flaskr*'s project structure a bit
- Updates docs to make sense with the new structure
  - Adds a new step about installing Flask apps with setuptools
  - Switches first-person style writing to second-person (reads better IMO)
  - Adds segments in *testing.rst* for running tests with setuptools

* Remove __init__.py from tests

- py.test recommends not using __init__.py

* Fix testing import errors
2016-07-05 17:30:59 -07:00
Sudheer Satyanarayana
1ffd07ff5a Fix small typo in python3 docs
Add missing 'be'
2016-06-21 17:27:03 +02:00
Markus Unterwaditzer
6e46d0cd39 Fix PyPy3 support and add bug references
Fix #1841
2016-06-13 20:33:57 +02:00
Markus Unterwaditzer
724f04d305 This is 0.11.2-dev 2016-06-07 18:23:09 +02:00
Markus Unterwaditzer
d1d82ca8ce Bump version to 0.11.1 2016-06-07 18:22:43 +02:00
Markus Unterwaditzer
2bde2065e6 Changelog for #1872 2016-06-03 18:43:32 +02:00
Josiah Philipsen
41e08f4ccd fixed unmatched elif
Also update relevant test
2016-06-03 18:42:07 +02:00
Markus Unterwaditzer
f91aea2aa0 quickstart: Remove reference to python hello.py
Fix #1826
2016-05-29 15:46:48 +02:00
Armin Ronacher
b23cd61e04 This is 0.12-dev 2016-05-29 11:02:48 +02:00
Armin Ronacher
13e6a01ac8 Bump version number to 0.11 2016-05-29 11:02:23 +02:00
Armin Ronacher
1eccb62965 Do not bump version in setup.py 2016-05-29 11:02:18 +02:00
Armin Ronacher
0e06302c79 Release is near 2016-05-29 11:01:22 +02:00
Armin Ronacher
e83d608d7d Merge pull request #1823 from pallets/feature/sentry-docs
Added sentry to docs
2016-05-27 12:00:16 +02:00
Armin Ronacher
42b7ab3f49 Incorporated ThiefMaster's suggestions for docs 2016-05-27 00:17:58 +02:00
Armin Ronacher
3e651e795a Added sentry to docs 2016-05-26 22:57:12 +02:00
Armin Ronacher
8d7e7aab31 Merge pull request #1822 from pallets/bugfix/better-pop
Improve application context popping
2016-05-26 22:31:15 +02:00
Armin Ronacher
c73cf0f82e Merge pull request #1821 from pallets/feature/plugin-cli
Added plugin support to the cli
2016-05-26 22:17:34 +02:00
Armin Ronacher
b13e83a2f2 Merge pull request #1813 from pallets/bugfix/scheme
Resolve state issue for url_for with forced scheme
2016-05-26 21:48:20 +02:00
Armin Ronacher
8482ce6b8c Improve application context popping
Exceptions during teardown handling will no longer leave application
contexts lingering around.  This fixes #1767
2016-05-26 21:46:56 +02:00
Armin Ronacher
87787b130b Merge pull request #1814 from pallets/feature/faster-template-loading
Fast path for disabled template load explain.
2016-05-26 21:34:56 +02:00
Armin Ronacher
9594876c1f Added plugin support to the cli 2016-05-26 21:29:01 +02:00
Armin Ronacher
21d595bee7 Change changelog to 0.11 2016-05-26 21:05:39 +02:00
Armin Ronacher
f9ea3fe026 1.0 -> 0.11 in the docs 2016-05-26 20:52:17 +02:00
Armin Ronacher
1df426aaaa More doc updates for FLASK_APP 2016-05-26 20:48:49 +02:00
Armin Ronacher
a7d829c618 Update docs to the new CLI patterns 2016-05-26 20:45:50 +02:00
Armin Ronacher
523e271183 Implemented simplified CLI interface 2016-05-26 20:07:52 +02:00
dataforger
92f63a1c1d fix docstring (#1818)
change string to docstring
2016-05-24 21:06:34 +02:00
ThiefMaster
c5900a1adf s/1.0/0.11/ in versionadded/versionchanged markers
closes #1817
2016-05-23 14:43:23 +02:00
Thomas Sanjurjo
bdbca923ef Addressing Issue 1809 (#1811)
document kwargs for Flask.register_blueprint
2016-05-22 07:09:21 -07:00
Armin Ronacher
96ec24f6e0 Fast path for disabled template load explain. 2016-05-22 11:36:40 +02:00
Armin Ronacher
6aee9f6d77 Resolve state issue for url_for with forced scheme
This fixes #1596
2016-05-22 10:45:29 +02:00
Armin Ronacher
883cb7cedc Always run gc before leak test 2016-05-22 10:34:48 +02:00
Frédéric Chapoton
c810fae9e8 turn 2 prints to py2/py3 compatible syntax (#1812) 2016-05-20 12:57:10 -07:00
Jannis Leidel
88500f5cc7 Forward ported CLI tests from Flask-CLI and fixed a bug with the CLI's name. (#1806)
* Forward port the CLI tests from Flask-CLI.

* Make sure the parameter passed to the CLI's AppGroup is the app's name, not the app itself.
2016-05-16 19:36:55 +02:00
Ronny Pfannschmidt
8011e1de28 Merge pull request #1801 from ben4ever/fix_doc_with_formatting
Fix "with" formatting in doc
2016-05-09 07:44:17 +02:00
Benjamin Dopplinger
9f4c569c83 Fix "with" formatting in doc 2016-05-09 13:37:27 +10:00
Markus Unterwaditzer
e8bd2c9202 Merge pull request #1795 from cgoldberg/update-docs-setuptools
update docs and refer to setuptools
2016-05-08 21:58:38 +02:00
Stefan Wójcik
e45e17c490 fix a grammar mistake (#1798) 2016-05-05 19:27:45 +02:00
Corey Goldberg
28b36f642d removed references to easy_install 2016-05-04 21:14:25 -04:00
Miguel Grinberg
de25e98f91 minor rewording of get_json documentation for clarity (#1781) 2016-05-04 06:46:49 -07:00
Corey Goldberg
1cc9ccfc67 update docs and refer to setuptools 2016-05-03 11:55:36 -04:00
David Lord
317d60307d fix some warnings while building docs 2016-04-11 16:13:59 -07:00
Daniel Quinn
be2abd2926 Fix typo (thing --> things) 2016-04-11 14:57:04 +02:00
Steven Loria
2bf477cfea Add JSONIFY_MIMETYPE configuration variable (#1728)
Allow jsonify responses' mimetype to be configured
2016-04-08 15:30:47 -07:00
Adrian
0690ce18c2 Correct spelling for Stack Overflow 2016-04-08 20:47:08 +02:00