diff --git a/docs/config.rst b/docs/config.rst index d0e1bcdb..dfcead34 100644 --- a/docs/config.rst +++ b/docs/config.rst @@ -199,7 +199,7 @@ The following configuration values are used internally by Flask: this name + the subdomains you want to use into your host config or setup a local `bind`_. -.. _bind: https://www.isc.org/software/bind +.. _bind: https://www.isc.org/downloads/bind/ .. versionadded:: 0.4 ``LOGGER_NAME`` @@ -363,7 +363,7 @@ your configuration files. However here a list of good recommendations: details about how to do that, head over to the :ref:`fabric-deployment` pattern. -.. _fabric: http://fabfile.org/ +.. _fabric: http://www.fabfile.org/ .. _instance-folders: diff --git a/docs/deploying/cgi.rst b/docs/deploying/cgi.rst index 3225bc58..9675d673 100644 --- a/docs/deploying/cgi.rst +++ b/docs/deploying/cgi.rst @@ -51,11 +51,11 @@ your app to be available, works too but the `ScriptAlias` directive won't work in that case: .. sourcecode:: apache - + RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f # Don't interfere with static files RewriteRule ^(.*)$ /path/to/the/application.cgi/$1 [L] For more information consult the documentation of your webserver. -.. _App Engine: http://code.google.com/appengine/ +.. _App Engine: https://developers.google.com/appengine/ diff --git a/docs/deploying/fastcgi.rst b/docs/deploying/fastcgi.rst index b4f01d57..a0d6d076 100644 --- a/docs/deploying/fastcgi.rst +++ b/docs/deploying/fastcgi.rst @@ -159,7 +159,7 @@ work in the URL root you have to work around a lighttpd bug with the Make sure to apply it only if you are mounting the application the URL root. Also, see the Lighty docs for more information on `FastCGI and Python -`_ (note that +`_ (note that explicitly passing a socket to run() is no longer necessary). Configuring nginx @@ -236,5 +236,5 @@ python path. Common problems are: .. _nginx: http://nginx.org/ .. _lighttpd: http://www.lighttpd.net/ -.. _cherokee: http://www.cherokee-project.com/ -.. _flup: http://trac.saddi.com/flup +.. _cherokee: http://cherokee-project.com/ +.. _flup: https://pypi.python.org/pypi/flup diff --git a/docs/deploying/mod_wsgi.rst b/docs/deploying/mod_wsgi.rst index 3c859910..e91aedc9 100644 --- a/docs/deploying/mod_wsgi.rst +++ b/docs/deploying/mod_wsgi.rst @@ -98,7 +98,7 @@ execute the application under a different user for security reasons: -Note: WSGIDaemonProcess isn't implemented in Windows and Apache will +Note: WSGIDaemonProcess isn't implemented in Windows and Apache will refuse to run with the above configuration. On a Windows system, eliminate those lines: .. sourcecode:: apache @@ -121,7 +121,7 @@ For more information consult the `mod_wsgi wiki`_. .. _mod_wsgi: http://code.google.com/p/modwsgi/ .. _installation instructions: http://code.google.com/p/modwsgi/wiki/QuickInstallationGuide .. _virtual python: https://pypi.python.org/pypi/virtualenv -.. _mod_wsgi wiki: http://code.google.com/p/modwsgi/wiki/ +.. _mod_wsgi wiki: http://code.google.com/p/modwsgi/w/list Troubleshooting --------------- diff --git a/docs/deploying/uwsgi.rst b/docs/deploying/uwsgi.rst index b05fdeec..25ed8008 100644 --- a/docs/deploying/uwsgi.rst +++ b/docs/deploying/uwsgi.rst @@ -63,5 +63,5 @@ it the WSGI `SCRIPT_NAME` or set the uwsgi modifier to make use of it:: .. _nginx: http://nginx.org/ .. _lighttpd: http://www.lighttpd.net/ -.. _cherokee: http://www.cherokee-project.com/ +.. _cherokee: http://cherokee-project.com/ .. _uwsgi: http://projects.unbit.it/uwsgi/ diff --git a/docs/extensions.rst b/docs/extensions.rst index 53dca56e..4f80f1e6 100644 --- a/docs/extensions.rst +++ b/docs/extensions.rst @@ -45,4 +45,4 @@ Once the ``flaskext_compat`` module is activated the :data:`flask.ext` will exist and you can start importing from there. .. _Flask Extension Registry: http://flask.pocoo.org/extensions/ -.. _flaskext_compat.py: https://github.com/mitsuhiko/flask/raw/master/scripts/flaskext_compat.py +.. _flaskext_compat.py: https://raw.githubusercontent.com/mitsuhiko/flask/master/scripts/flaskext_compat.py diff --git a/docs/htmlfaq.rst b/docs/htmlfaq.rst index 434bb656..fdf29634 100644 --- a/docs/htmlfaq.rst +++ b/docs/htmlfaq.rst @@ -186,7 +186,7 @@ Many other features have been added, as well. A good guide to new features in HTML5 is Mark Pilgrim's soon-to-be-published book, `Dive Into HTML5`_. Not all of them are supported in browsers yet, however, so use caution. -.. _Dive Into HTML5: http://www.diveintohtml5.info/ +.. _Dive Into HTML5: http://diveintohtml5.info/ What should be used? -------------------- diff --git a/docs/installation.rst b/docs/installation.rst index 3923350c..5bf668af 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -180,8 +180,8 @@ check that you can now just type ``python`` to bring up the interpreter. Finally, to install `virtualenv`_, you can simply run:: > pip install virtualenv - + Then you can be off on your way following the installation instructions above. -.. _get-pip.py: https://raw.github.com/pypa/pip/master/contrib/get-pip.py +.. _get-pip.py: https://raw.githubusercontent.com/pypa/pip/master/contrib/get-pip.py .. _ez_setup.py: https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py diff --git a/docs/patterns/caching.rst b/docs/patterns/caching.rst index a0633cf9..97e0f35d 100644 --- a/docs/patterns/caching.rst +++ b/docs/patterns/caching.rst @@ -27,7 +27,7 @@ cache that keeps the item stored in the memory of the Python interpreter:: cache = SimpleCache() If you want to use memcached, make sure to have one of the memcache modules -supported (you get them from `PyPI `_) and a +supported (you get them from `PyPI `_) and a memcached server running somewhere. This is how you connect to such an memcached server then:: @@ -44,7 +44,7 @@ Using a Cache ------------- Now how can one use such a cache? There are two very important -operations: :meth:`~werkzeug.contrib.cache.BaseCache.get` and +operations: :meth:`~werkzeug.contrib.cache.BaseCache.get` and :meth:`~werkzeug.contrib.cache.BaseCache.set`. This is how to use them: To get an item from the cache call diff --git a/docs/patterns/fabric.rst b/docs/patterns/fabric.rst index b02ad277..e915103b 100644 --- a/docs/patterns/fabric.rst +++ b/docs/patterns/fabric.rst @@ -186,11 +186,11 @@ deployment actually fun: out the latest version on the server and then install. That way you can also easily go back to older versions. - hook in testing functionality so that you can deploy to an external - server and run the testsuite. + server and run the testsuite. Working with Fabric is fun and you will notice that it's quite magical to type ``fab deploy`` and see your application being deployed automatically to one or more remote servers. -.. _Fabric: http://fabfile.org/ +.. _Fabric: http://www.fabfile.org/ diff --git a/docs/patterns/jquery.rst b/docs/patterns/jquery.rst index bb1b4c06..913bcedf 100644 --- a/docs/patterns/jquery.rst +++ b/docs/patterns/jquery.rst @@ -164,5 +164,5 @@ explanation of the little bit of code above: If you don't get the whole picture, download the `sourcecode for this example -`_ +`_ from github. diff --git a/docs/patterns/sqlalchemy.rst b/docs/patterns/sqlalchemy.rst index 29a0d9f9..d34f39be 100644 --- a/docs/patterns/sqlalchemy.rst +++ b/docs/patterns/sqlalchemy.rst @@ -110,7 +110,7 @@ Querying is simple as well: .. _SQLAlchemy: http://www.sqlalchemy.org/ .. _declarative: - http://www.sqlalchemy.org/docs/orm/extensions/declarative.html + http://docs.sqlalchemy.org/en/latest/orm/extensions/declarative.html Manual Object Relational Mapping -------------------------------- @@ -186,7 +186,7 @@ Then you can either declare the tables in your code like in the examples above, or automatically load them:: from sqlalchemy import Table - + users = Table('users', metadata, autoload=True) To insert data you can use the `insert` method. We have to get a @@ -215,4 +215,4 @@ You can also pass strings of SQL statements to the (1, u'admin', u'admin@localhost') For more information about SQLAlchemy, head over to the -`website `_. +`website `_. diff --git a/docs/patterns/wtforms.rst b/docs/patterns/wtforms.rst index 8017aea5..49bdbd43 100644 --- a/docs/patterns/wtforms.rst +++ b/docs/patterns/wtforms.rst @@ -122,5 +122,5 @@ takes advantage of the `_formhelpers.html` template: For more information about WTForms, head over to the `WTForms website`_. -.. _WTForms: http://wtforms.simplecodes.com/ -.. _WTForms website: http://wtforms.simplecodes.com/ +.. _WTForms: http://wtforms.readthedocs.org/ +.. _WTForms website: http://wtforms.readthedocs.org/ diff --git a/docs/quickstart.rst b/docs/quickstart.rst index b39b2a3c..accb942f 100644 --- a/docs/quickstart.rst +++ b/docs/quickstart.rst @@ -41,7 +41,7 @@ should see your hello world greeting. So what did that code do? 1. First we imported the :class:`~flask.Flask` class. An instance of this - class will be our WSGI application. + class will be our WSGI application. 2. Next we create an instance of this class. The first argument is the name of the application's module or package. If you are using a single module (as in this example), you should use `__name__` because depending on if it's @@ -878,7 +878,7 @@ Ready to deploy your new Flask app? To wrap up the quickstart, you can immediately deploy to a hosted platform, all of which offer a free plan for small projects: -- `Deploying Flask on Heroku `_ +- `Deploying Flask on Heroku `_ - `Deploying WSGI on dotCloud `_ with `Flask-specific notes `_ diff --git a/docs/testing.rst b/docs/testing.rst index 95b2021a..de5c9143 100644 --- a/docs/testing.rst +++ b/docs/testing.rst @@ -11,7 +11,7 @@ improve existing code and developers of untested applications tend to become pretty paranoid. If an application has automated tests, you can safely make changes and instantly know if anything breaks. -Flask provides a way to test your application by exposing the Werkzeug +Flask provides a way to test your application by exposing the Werkzeug test :class:`~werkzeug.test.Client` and handling the context locals for you. You can then use that with your favourite testing solution. In this documentation we will use the :mod:`unittest` package that comes pre-installed with Python. @@ -19,17 +19,17 @@ we will use the :mod:`unittest` package that comes pre-installed with Python. The Application --------------- -First, we need an application to test; we will use the application from -the :ref:`tutorial`. If you don't have that application yet, get the +First, we need an application to test; we will use the application from +the :ref:`tutorial`. If you don't have that application yet, get the sources from `the examples`_. .. _the examples: - http://github.com/mitsuhiko/flask/tree/master/examples/flaskr/ + https://github.com/mitsuhiko/flask/tree/master/examples/flaskr/ The Testing Skeleton -------------------- -In order to test the application, we add a second module +In order to test the application, we add a second module (`flaskr_tests.py`) and create a unittest skeleton there:: import os @@ -55,15 +55,15 @@ In order to test the application, we add a second module The code in the :meth:`~unittest.TestCase.setUp` method creates a new test client and initializes a new database. This function is called before -each individual test function is run. To delete the database after the +each individual test function is run. To delete the database after the test, we close the file and remove it from the filesystem in the :meth:`~unittest.TestCase.tearDown` method. Additionally during setup the ``TESTING`` config flag is activated. What it does is disabling the error catching during request handling so that you get better error reports when performing test requests against the application. -This test client will give us a simple interface to the application. We can -trigger test requests to the application, and the client will also keep track +This test client will give us a simple interface to the application. We can +trigger test requests to the application, and the client will also keep track of cookies for us. Because SQLite3 is filesystem-based we can easily use the tempfile module @@ -89,8 +89,8 @@ with an exception. The First Test -------------- -Now it's time to start testing the functionality of the application. -Let's check that the application shows "No entries here so far" if we +Now it's time to start testing the functionality of the application. +Let's check that the application shows "No entries here so far" if we access the root of the application (``/``). To do this, we add a new test method to our class, like this:: @@ -109,13 +109,13 @@ test method to our class, like this:: rv = self.app.get('/') assert 'No entries here so far' in rv.data -Notice that our test functions begin with the word `test`; this allows -:mod:`unittest` to automatically identify the method as a test to run. +Notice that our test functions begin with the word `test`; this allows +:mod:`unittest` to automatically identify the method as a test to run. -By using `self.app.get` we can send an HTTP `GET` request to the application with -the given path. The return value will be a :class:`~flask.Flask.response_class` object. +By using `self.app.get` we can send an HTTP `GET` request to the application with +the given path. The return value will be a :class:`~flask.Flask.response_class` object. We can now use the :attr:`~werkzeug.wrappers.BaseResponse.data` attribute to inspect -the return value (as string) from the application. In this case, we ensure that +the return value (as string) from the application. In this case, we ensure that ``'No entries here so far'`` is part of the output. Run it again and you should see one passing test:: @@ -132,8 +132,8 @@ Logging In and Out The majority of the functionality of our application is only available for the administrative user, so we need a way to log our test client in and out -of the application. To do this, we fire some requests to the login and logout -pages with the required form data (username and password). And because the +of the application. To do this, we fire some requests to the login and logout +pages with the required form data (username and password). And because the login and logout pages redirect, we tell the client to `follow_redirects`. Add the following two methods to your `FlaskrTestCase` class:: @@ -194,7 +194,7 @@ suite. .. _MiniTwit Example: - http://github.com/mitsuhiko/flask/tree/master/examples/minitwit/ + https://github.com/mitsuhiko/flask/tree/master/examples/minitwit/ Other Testing Tricks diff --git a/docs/tutorial/dbcon.rst b/docs/tutorial/dbcon.rst index aa6d8bae..00f6c32e 100644 --- a/docs/tutorial/dbcon.rst +++ b/docs/tutorial/dbcon.rst @@ -75,4 +75,4 @@ Continue to :ref:`tutorial-dbinit`. larger `, it's a good idea not to. .. _example source: - http://github.com/mitsuhiko/flask/tree/master/examples/flaskr/ + https://github.com/mitsuhiko/flask/tree/master/examples/flaskr/ diff --git a/docs/tutorial/index.rst b/docs/tutorial/index.rst index da37cf7a..beb22709 100644 --- a/docs/tutorial/index.rst +++ b/docs/tutorial/index.rst @@ -15,7 +15,7 @@ If you want the full sourcecode in advance or for comparison, check out the `example source`_. .. _example source: - http://github.com/mitsuhiko/flask/tree/master/examples/flaskr/ + https://github.com/mitsuhiko/flask/tree/master/examples/flaskr/ .. toctree:: :maxdepth: 2 diff --git a/docs/upgrading.rst b/docs/upgrading.rst index ccfa82ad..5b2d6f85 100644 --- a/docs/upgrading.rst +++ b/docs/upgrading.rst @@ -64,7 +64,7 @@ If you maintain an extension that was using :data:`~flask._request_ctx_stack` before, please consider changing to :data:`~flask._app_ctx_stack` if it makes sense for your extension. For instance, the app context stack makes sense for extensions which connect to databases. Using the app context stack instead of -the request context stack will make extensions more readily handle use cases +the request context stack will make extensions more readily handle use cases outside of requests. Version 0.8 @@ -115,7 +115,7 @@ good. To apply the upgrade script do the following: 1. Download the script: `flask-07-upgrade.py - `_ + `_ 2. Run it in the directory of your application:: python flask-07-upgrade.py > patchfile.diff