Add larger app ex
diff --git a/docs/patterns/packages.rst b/docs/patterns/packages.rst
index 1cd7797420..1bb84f8cca 100644
--- a/docs/patterns/packages.rst
+++ b/docs/patterns/packages.rst
@@ -17,6 +17,10 @@ this::
             login.html
             ...
 
+If you find yourself stuck on something, feel free
+to take a look at the source code for this example.
+You'll find `the full src for this example here`_.
+
 Simple Packages
 ---------------
 
@@ -130,6 +134,7 @@ You should then end up with something like that::
 
 
 .. _working-with-modules:
+.. _the full src for this example here: https://github.com/pallets/flask/tree/master/examples/patterns/largerapp
 
 Working with Blueprints
 -----------------------
diff --git a/examples/patterns/largerapp/setup.py b/examples/patterns/largerapp/setup.py
new file mode 100644
index 0000000000..eaf00f0718
--- /dev/null
+++ b/examples/patterns/largerapp/setup.py
@@ -0,0 +1,10 @@
+from setuptools import setup
+
+setup(
+    name='yourapplication',
+    packages=['yourapplication'],
+    include_package_data=True,
+    install_requires=[
+        'flask',
+    ],
+)
diff --git a/examples/patterns/largerapp/tests/test_largerapp.py b/examples/patterns/largerapp/tests/test_largerapp.py
new file mode 100644
index 0000000000..6bc0531e03
--- /dev/null
+++ b/examples/patterns/largerapp/tests/test_largerapp.py
@@ -0,0 +1,12 @@
+from yourapplication import app
+import pytest
+
+@pytest.fixture
+def client():
+    app.config['TESTING'] = True
+    client = app.test_client()
+    return client
+
+def test_index(client):
+    rv = client.get('/')
+    assert b"Hello World!" in rv.data
\ No newline at end of file
diff --git a/examples/patterns/largerapp/yourapplication/__init__.py b/examples/patterns/largerapp/yourapplication/__init__.py
new file mode 100644
index 0000000000..089d29371c
--- /dev/null
+++ b/examples/patterns/largerapp/yourapplication/__init__.py
@@ -0,0 +1,4 @@
+from flask import Flask
+app = Flask(__name__)
+
+import yourapplication.views
\ No newline at end of file
diff --git a/examples/patterns/largerapp/yourapplication/static/style.css b/examples/patterns/largerapp/yourapplication/static/style.css
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/examples/patterns/largerapp/yourapplication/templates/index.html b/examples/patterns/largerapp/yourapplication/templates/index.html
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/examples/patterns/largerapp/yourapplication/templates/layout.html b/examples/patterns/largerapp/yourapplication/templates/layout.html
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/examples/patterns/largerapp/yourapplication/templates/login.html b/examples/patterns/largerapp/yourapplication/templates/login.html
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/examples/patterns/largerapp/yourapplication/views.py b/examples/patterns/largerapp/yourapplication/views.py
new file mode 100644
index 0000000000..b112328e13
--- /dev/null
+++ b/examples/patterns/largerapp/yourapplication/views.py
@@ -0,0 +1,5 @@
+from yourapplication import app
+
+@app.route('/')
+def index():
+    return 'Hello World!'
\ No newline at end of file
diff --git a/tox.ini b/tox.ini
index 406de5dde5..c070a6291d 100644
--- a/tox.ini
+++ b/tox.ini
@@ -10,6 +10,7 @@ commands =
     # We need to install those after Flask is installed.
     pip install -e examples/flaskr
     pip install -e examples/minitwit
+    pip install -e examples/patterns/largerapp
     py.test --cov=flask --cov-report html []
 deps=
     pytest

I chose the wrong base: https://github.com/pallets/flask/pull/2130

Original PR message:

> Addresses: #1902 (comment)
> 
> Confirms that the larger application as outlined in the docs, works as expected. For the sake of less confusion, for those working through this example, having src might be helpful. Not everyone will want to work along with the docs. If there are parts of the docs that are not clear, we should fix that as well. (They seemed clear to me).

Thiefmaster's response:

> The weird commits in this PR aside (rebase to upstream/master and force-push to fix), I'm not sure how useful this is to have in the repo... Especially since having a "large" app without an app factory is somewhat questionable...

My response:

> @ThiefMaster Sorry about that. I didn't choose correct base. I was thinking that in order to debug issues that people are having with code examples in the docs, it would be useful to have those examples on-hand.
> 
> I agree. But maybe until we can put something better together for #2027, this addition could just be temporary and we could deprecate this "larger applications" example at later time.