Commit Graph

148 Commits

Author SHA1 Message Date
Arie Marie 'Thomas' Dalleis 7c51019985 Fix typos and formatting 2017-08-15 16:05:48 +02:00
David Lord 465922e5f1
clean up secret key docs
consistent key across docs and examples
consistent key across tests, set in conftest
2017-06-28 07:58:06 -07:00
David Lord 6a8c8c3484
set example app names directly 2017-05-27 12:47:44 -07:00
David Lord 11f463f1bd
flaskr correct app name 2017-05-27 08:44:07 -07:00
Kenneth Reitz e26cc8f904 i think this is how this works now 2017-05-25 18:01:52 -04:00
Kenneth Reitz e6740ec2f3 Merge branch 'master' into improve-flaskr 2017-05-25 14:40:52 -07:00
bovarysme fe27d04cc1 Fix a small oversight in the testing docs 2017-05-23 22:22:16 +02:00
David Lord a037762781 Merge pull request #2311 from bovarysme/use-yield-syntax
Use the yield syntax in pytest's fixtures
2017-05-23 12:00:34 -07:00
bovarysme 5963cb5a51 Use the yield syntax in pytest's fixtures 2017-05-23 18:21:29 +02:00
Neil Grey 378a11f992 For Issue #2286: Updating test_flaskr to use yield inside fixture 2017-05-22 18:22:08 -07:00
Kyle Lawlor 54b6fc8de6 Add in a fixture utilizing app factory 2017-04-02 12:29:37 -04:00
Kyle Lawlor 8cf32bca51 Adds in blueprints and an application factory 2017-04-01 20:37:19 -04:00
Jeff Widman bb0e755c80 Migrate various docs links to https (#2180)
Also fixed a few outdated links
2017-02-11 10:43:11 +01:00
wgwz 46c1383919 Remove unneccessary arg in client fixture 2016-12-31 12:37:39 -05:00
wgwz 92fa444259 Moves largerapp into patterns dir and add test
- also adds this pattern into tox for testing
2016-12-31 12:08:25 -05:00
wgwz e49b73d2cf Adds the largerapp from the docs as an example 2016-12-30 13:42:05 -05:00
Hopsken 7f28837167 Update README for minitwit (#2119)
add step 2 to run minitwit
2016-12-21 21:07:09 +01:00
Markus Unterwaditzer 7e1a13ffbd Fix import error 2016-11-15 11:58:44 +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
Hassam cd13a5cf62 Fix #2051: Fix flaskr import in flaskr/__init__.py (#2052) 2016-10-08 20:34:56 +02:00
Markus Unterwaditzer 7132feb1a5 Merge branch '0.11-maintenance' 2016-09-08 15:21:05 +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
ahmedakef c54d67adee close <li> tag in lines (16,18) (#1951)
i noticed that <li> tag haven't closed in lines 15,18 
which is bad practice as if i put "some thing : <h1> some text </h1>" in the text-area  all the other articles become <h1> so big and color blue
2016-07-28 22:46:42 +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
Armin Ronacher a7d829c618 Update docs to the new CLI patterns 2016-05-26 20:45:50 +02:00
Aayush Kasurde 8ba986e45e Added fix for issue 1529
Signed-off-by: Aayush Kasurde <aayush.kasurde@gmail.com>
2015-07-12 21:08:16 +05:30
Markus Unterwaditzer 1ba6c2248d Add readme to persona example
Fix #1310
2015-01-17 13:18:27 +01:00
Parkayun 33534bb4a9 Happy New Year 2015 2015-01-02 11:35:00 +09:00
defuz eb05001f8a docs: Don't touch markdown files 2014-11-05 08:40:57 +03:00
defuz a8f570cc62 docs: :file:`app.py`, :file:`yourapp/templates` 2014-11-05 06:45:22 +03:00
Petr Zemek 3767e7ba4f Unify the uses of "urls" vs "URLs".
Use "URLs", which is more prevailing in the source code.
2014-10-27 11:36:23 +01:00
tay-k f95acc64d6 fix filename of test files in README of examples 2014-09-18 18:21:36 +09:00
Markus Unterwaditzer 8fa5e32d9a Tests pass now. 2014-09-11 22:09:50 +02:00
Jeffrey D 3c48bf8935 Addressed issue #1134 2014-07-29 20:42:28 -05:00
Suraj Patil eb0c8a6bee The example does not execute
With the inclusion of the app.run we now are able to execute the program, it would be great if we'd have even more detailed docs available for the examples
2014-07-03 18:19:09 +05:30
Armin Ronacher d2d8e66130 Fixed flask tests 2014-05-02 11:46:04 +01:00
Armin Ronacher 9ab5987100 Updated the examples to be cli based 2014-04-29 01:48:31 +02:00
Armin Ronacher a3a5075a94 Updated tutorial to the flask script 2014-04-28 15:18:27 +02:00
Kenneth Reitz 58681ec11e Merge pull request #889 from mattskone/master
Escaped 'text' keyword in column name.
2014-03-21 16:38:00 -04:00
Armin Ronacher 9074bc46af Switch away from /tmp for windows users 2014-02-08 22:07:13 +00:00
Tommaso Allevi b81b040110 Remove unused import 2014-01-11 01:13:32 +01:00
Tommaso Allevi f0f6545374 Use json method
Use json method of response.Response
2014-01-11 01:09:30 +01:00
Daniel Neuhäuser d517f35d60 Merge branch '0.10-maintenance' 2014-01-02 19:21:55 +01:00
Daniel Neuhäuser 52098e1e4f Happy New Year 2014 2014-01-02 19:21:07 +01:00
Matt Skone 1df0f2dc1c Escaped 'text' keyword in column name. 2013-10-15 09:17:19 -07:00
Armin Ronacher 05161d3584 Rewrote tutorial to use the g based appcontext object 2013-09-01 01:32:41 +06:00
Armin Ronacher 42cf782ee3 Removed g object from example as it was unused 2013-08-30 19:50:45 +06:00
Armin Ronacher 23d8d66256 Added site name to persona login 2013-06-09 01:39:51 +01:00
Armin Ronacher 5f648a8eb8 Added Persona example 2013-06-09 01:30:15 +01:00
Thomas Waldmann 8bb972e5ae fix minitwit/flaskr test errors, improve docs about file open mode
app.open_resource needs to get called with the correct mode param (python3
will read bytes [not str] if the wrong mode is used), add mode param docs.

rv.data is bytes, fix the data type we compare it with to be also bytes
2013-05-25 19:13:48 +02:00
Thomas Waldmann e1d356fb71 ported some more stuff to py 3.3
removed init_jinja_globals hack from app.py after consulting mitsuhiko
(didn't work on py 3.3 "as is")

removed with_statement future imports, not needed any more

needs more work on 2.7 as well as on 3.3
2013-05-22 01:33:04 +02:00
Alexander Thaller 8ca7fc47d0 Update README
No need to manually initialize the database with a call to `init_db()` as this call is done before `app.run()` in flaskr.py, when you run the file.
2013-04-05 13:48:08 +03:00
Kenneth Reitz 3fdcefbcda Merge pull request #625 from soulseekah/master
Use sqlite3.Row factory in Flaskr (#588)
2013-01-24 20:22:02 -08:00
Kenneth Reitz 17fc38c397 Merge pull request #617 from tony/jquery-example-iteration1
jQuery example: submit on enter, focus field on load, ajax to callback function, " to '.
2013-01-24 20:21:31 -08:00
oliversong cc82feb084 Changing string to text in schema files 2012-12-26 00:05:18 -05:00
Armin Ronacher 61d43c7f12 Removed unnecessary end-tags and fixed some broken html 2012-12-19 15:46:18 +01:00
Iyra Gaura be1ed33271 Ended your paragraph tag. 2012-11-17 18:13:14 +00:00
Gennady Kovshenin 82b29c09ac Use sqlite3.Row factory in Flaskr
As pointed out in issue #588 sqlite3.Row should be used instead of
using casting to dict(). Also altered the "Easy Querying" Patterns
example to include the more correct way to return rows as dicts.
Did not touch Tutorial examples ("Views"), as these are not up to
date with the current Flaskr code, and the "Show Entries" section
points out the "Easy Querying" section on how to convert to a
dict().
2012-11-05 06:00:46 +06:00
Tony Narlock af76dd0fd4 Highlight first field on page load, enter sends submit request, double quote to single quote. Submission focuses first field again 2012-10-19 12:20:37 -04:00
Armin Ronacher c2e5799879 Updated examples to new sqlite patterns and added new section to appcontext docs 2012-10-09 14:02:32 -05:00
Dmitry Shevchenko 62621ccd13 Blueprint example tests 2012-03-01 02:24:56 -06:00
Dmitry Shevchenko 85ad4ffb60 Blueprint example app 2012-03-01 02:07:26 -06:00
Armin Ronacher d3ca55177a Updated the docs and examples to non-failing teardown handlers 2011-08-25 20:56:43 +01:00
Armin Ronacher 7e55b5084d Mention the TESTING flag in the docs 2011-06-17 21:53:11 +02:00
Armin Ronacher b51ecd7f21 Updated examples 2011-05-27 20:29:47 +02:00
Armin Ronacher 164067920b Updated examples to work with pypy which has a incomplete sqlite3 in 1.4. Also disable a euc-kr test that does not work on pypy 2010-12-01 17:22:55 +01:00
Daniel Haaker 94a7312d5a Add missing semicolon to test
Signed-off-by: Armin Ronacher <armin.ronacher@active-4.com>
2010-10-29 18:41:10 +02:00
Armin Ronacher 70dc2b66a0 Removed useless script reference. This fixes #87 2010-07-16 13:14:54 +02:00
Armin Ronacher dfecc86dd3 Ported examples over to new config. documented upgrading 2010-05-27 21:17:25 +02:00
Armin Ronacher e432d833b5 Fixed stuff I broke 2010-05-27 13:30:54 +02:00
Armin Ronacher 9d19b77acf Added lazyloading pattern and explicit chapter links in tutorial.
This fixes #49.
2010-05-26 14:49:01 +02:00
Armin Ronacher da8f88a22e Removed OpenID example, that's now in flaskext.openid anyways. 2010-05-06 13:32:52 +02:00
Armin Ronacher bc0c0559e3 Added OpenID example 2010-05-04 11:23:01 +02:00
Armin Ronacher 3053fcdb0d Make the example tests pass on Windows.
Also updated the documentation regarding that.
2010-04-20 20:01:00 +02:00
florentx 3c821a0fa4 Fix typos and remove unused import. 2010-04-20 18:40:58 +02:00
Armin Ronacher a99e408bd1 Finished jQuery example documentation. 2010-04-19 15:59:16 +02:00
Armin Ronacher 6e2be6a0b3 Added JSON Support and started working on jQuery docs 2010-04-19 15:39:07 +02:00
Armin Ronacher 73a47a0db1 Removed unused stuff from minitwit and fixed a bug. 2010-04-18 23:42:11 +02:00
Armin Ronacher bf52a17902 Removed useless code 2010-04-18 16:29:41 +02:00
Armin Ronacher fb2d2e446b request_init -> before_request and request_shutdown -> after_request
This fixes #9.
2010-04-16 11:03:16 +02:00
Armin Ronacher 6dd92ae4b3 Beefed up the tutorial 2010-04-16 02:03:45 +02:00
Armin Ronacher 1246f4088a First part of the tutorial. Many explanations missing but it's a start. 2010-04-15 02:21:46 +02:00
Armin Ronacher c4f5c2fb9a Fixed a typo 2010-04-14 17:09:34 +02:00
Armin Ronacher fc94599285 Removed useless imports and added README 2010-04-14 16:47:53 +02:00
Armin Ronacher c33675f025 Added mini blogging application as Flask example.
This should become the tutorial.
2010-04-14 16:44:29 +02:00
Armin Ronacher 2f5a4f8dbc Doc updates and typo fixes 2010-04-12 00:14:59 +02:00
Armin Ronacher ef524f2cfd No need for the closing import 2010-04-11 18:47:32 +02:00
Armin Ronacher f2dc38cda6 Added tests for minitwit. Testing with Flask is awesome 2010-04-11 18:45:06 +02:00
Armin Ronacher 03168a5d53 Removed the useless apishowcase example 2010-04-11 17:58:45 +02:00
Armin Ronacher 727c701686 And finished documentation for most parts. 2010-04-09 13:40:05 +02:00
Armin Ronacher 4aa76212d1 Updated documentation. Starting to look pretty good 2010-04-09 01:32:39 +02:00
Armin Ronacher 3b36bef2e6 Improved documentation, added a contextmanager for request binding 2010-04-08 19:03:15 +02:00
Armin Ronacher 44b42e0fbd Added a README file for MiniTwit. 2010-04-06 16:16:34 +02:00
Armin Ronacher 4ec7d2a0d8 Started working on documentation.
So far just the stable parts :)
2010-04-06 16:02:14 +02:00
Armin Ronacher 33850c0ebd Initial checkin of stuff that exists so far. 2010-04-06 13:12:57 +02:00