Merge pull request #3082 from stevepiercy/master
Update docs to synch with cookiecutter updates
| | |
| | | CHANGES = f.read() |
| | | |
| | | requires = [ |
| | | 'plaster_pastedeploy', |
| | | 'pyramid', |
| | | 'pyramid_jinja2', |
| | | 'pyramid_debugtoolbar', |
| | |
| | | |
| | | .. literalinclude:: myproject/setup.py |
| | | :language: python |
| | | :linenos: |
| | | :lines: 11-22 |
| | | :lineno-start: 11 |
| | | :emphasize-lines: 8- |
| | | :lines: 11-23 |
| | | :lineno-match: |
| | | :emphasize-lines: 9- |
| | | |
| | | Remember to change the dependency. |
| | | |
| | | .. literalinclude:: myproject/setup.py |
| | | :language: python |
| | | :linenos: |
| | | :lines: 40-44 |
| | | :lineno-start: 40 |
| | | :lines: 42-46 |
| | | :lineno-match: |
| | | :emphasize-lines: 2-4 |
| | | |
| | | As always, whenever you change your dependencies, make sure to run the correct |
| | |
| | | .. literalinclude:: quick_tour/package/setup.py |
| | | :language: python |
| | | :lineno-match: |
| | | :lines: 11-16 |
| | | :emphasize-lines: 4 |
| | | :lines: 11-17 |
| | | :emphasize-lines: 5 |
| | | |
| | | It was installed when you previously ran: |
| | | |
| | |
| | | $ $VENV/bin/pip install -e ".[testing]" |
| | | |
| | | The ``pyramid_debugtoolbar`` package is a Pyramid add-on, which means we need |
| | | to include its configuration into our web application. The cookiecutter already took care of this for us in its ``__init__.py``: |
| | | |
| | | .. literalinclude:: quick_tour/package/hello_world/__init__.py |
| | | :language: python |
| | | :lineno-match: |
| | | :lines: 8 |
| | | |
| | | And it uses the ``pyramid.includes`` facility in our ``development.ini``: |
| | | to include its configuration into our web application. The cookiecutter already took care of this for us in its ``development.ini`` using the ``pyramid.includes`` facility: |
| | | |
| | | .. literalinclude:: quick_tour/package/development.ini |
| | | :language: ini |
| | |
| | | Our ``pyramid-cookiecutter-starter`` cookiecutter generated a ``tests.py`` module with |
| | | one unit test and one functional test in it. It also configured ``setup.py`` with test requirements: |
| | | ``py.test`` as the test runner, ``WebTest`` for running view tests, and the |
| | | ``pytest-cov`` tool which yells at us for code that isn't tested. The |
| | | highlighted lines show this: |
| | | ``pytest-cov`` tool which yells at us for code that isn't tested: |
| | | |
| | | .. literalinclude:: quick_tour/package/setup.py |
| | | :language: python |
| | | :lineno-match: |
| | | :lines: 18-22 |
| | | :lines: 19-23 |
| | | |
| | | .. literalinclude:: quick_tour/package/setup.py |
| | | :language: python |
| | | :lineno-match: |
| | | :lines: 42-44 |
| | | :lines: 43-45 |
| | | |
| | | We already installed the test requirements when we ran the command ``$VENV/bin/pip install -e ".[testing]"``. We can now run all our tests: |
| | | |
| | |
| | | CHANGES = f.read() |
| | | |
| | | requires = [ |
| | | 'plaster_pastedeploy', |
| | | 'pyramid', |
| | | 'pyramid_jinja2', |
| | | 'pyramid_debugtoolbar', |
| | |
| | | CHANGES = f.read() |
| | | |
| | | requires = [ |
| | | 'plaster_pastedeploy', |
| | | 'pyramid', |
| | | 'pyramid_jinja2', |
| | | 'pyramid_debugtoolbar', |
| | |
| | | CHANGES = f.read() |
| | | |
| | | requires = [ |
| | | 'plaster_pastedeploy', |
| | | 'pyramid', |
| | | 'pyramid_jinja2', |
| | | 'pyramid_debugtoolbar', |
| | |
| | | |
| | | sqlalchemy.url = sqlite:///%(here)s/sqla_demo.sqlite |
| | | |
| | | retry.attempts = 3 |
| | | |
| | | # By default, the toolbar only appears for clients from IP addresses |
| | | # '127.0.0.1' and '::1'. |
| | | # debugtoolbar.hosts = 127.0.0.1 ::1 |
| | |
| | | |
| | | sqlalchemy.url = sqlite:///%(here)s/sqla_demo.sqlite |
| | | |
| | | retry.attempts = 3 |
| | | |
| | | ### |
| | | # wsgi server configuration |
| | | ### |
| | |
| | | CHANGES = f.read() |
| | | |
| | | requires = [ |
| | | 'pyramid', |
| | | 'pyramid_jinja2', |
| | | 'plaster_pastedeploy', |
| | | 'pyramid >= 1.9a', |
| | | 'pyramid_debugtoolbar', |
| | | 'pyramid_jinja2', |
| | | 'pyramid_retry', |
| | | 'pyramid_tm', |
| | | 'SQLAlchemy', |
| | | 'transaction', |
| | |
| | | """ |
| | | settings = config.get_settings() |
| | | settings['tm.manager_hook'] = 'pyramid_tm.explicit_manager' |
| | | |
| | | # use pyramid_tm to hook the transaction lifecycle to the request |
| | | config.include('pyramid_tm') |
| | | |
| | | # use pyramid_retry to retry a request when transient exceptions occur |
| | | config.include('pyramid_retry') |
| | | |
| | | session_factory = get_session_factory(get_engine(settings)) |
| | | config.registry['dbsession_factory'] = session_factory |
| | | |
| | |
| | | |
| | | .. literalinclude:: src/authorization/setup.py |
| | | :linenos: |
| | | :emphasize-lines: 21 |
| | | :emphasize-lines: 23 |
| | | :language: python |
| | | |
| | | Only the highlighted line needs to be added. |
| | |
| | | Now add those policies to the configuration: |
| | | |
| | | .. literalinclude:: src/authorization/tutorial/__init__.py |
| | | :lines: 18-23 |
| | | :lines: 18-25 |
| | | :lineno-match: |
| | | :emphasize-lines: 1-3,5-6 |
| | | :emphasize-lines: 1-3,7-8 |
| | | :language: python |
| | | |
| | | Only the highlighted lines need to be added. |
| | |
| | | |
| | | .. literalinclude:: src/authorization/tutorial/__init__.py |
| | | :linenos: |
| | | :emphasize-lines: 4-5,8,18-20,22-23 |
| | | :emphasize-lines: 4-5,8,18-20,24-25 |
| | | :language: python |
| | | |
| | | Only the highlighted lines need to be added or edited. |
| | |
| | | factory and the settings keywords parsed by :term:`PasteDeploy`. The root |
| | | factory is named ``root_factory``. |
| | | |
| | | #. *Line 15*. Include support for the :term:`Chameleon` template rendering |
| | | #. *Lines 15 and 16*. Get the settings and use an explicit transaction transaction manager for apps so that they do not implicitly create new transactions when touching the manager outside of the ``pyramid_tm`` lifecycle. |
| | | |
| | | #. *Line 17*. Include support for the :term:`Chameleon` template rendering |
| | | bindings, allowing us to use the ``.pt`` templates. |
| | | |
| | | #. *Line 16*. Include support for ``pyramid_tm``, allowing Pyramid requests to join the active transaction as provided by the `transaction <https://pypi.python.org/pypi/transaction>`_ package. |
| | | #. *Line 18*. Include support for ``pyramid_tm``, allowing Pyramid requests to join the active transaction as provided by the `transaction <https://pypi.python.org/pypi/transaction>`_ package. |
| | | |
| | | #. *Line 17*. Include support for ``pyramid_zodbconn``, providing integration between :term:`ZODB` and a Pyramid application. |
| | | #. *Line 19*. Include support for ``pyramid_retry`` to retry a request when transient exceptions occur. |
| | | |
| | | #. *Line 18*. Register a "static view", which answers requests whose URL |
| | | #. *Line 20*. Include support for ``pyramid_zodbconn``, providing integration between :term:`ZODB` and a Pyramid application. |
| | | |
| | | #. *Line 21*. Register a "static view", which answers requests whose URL |
| | | paths start with ``/static``, using the |
| | | :meth:`pyramid.config.Configurator.add_static_view` method. This |
| | | statement registers a view that will serve up static assets, such as CSS |
| | |
| | | |
| | | .. literalinclude:: src/views/setup.py |
| | | :linenos: |
| | | :emphasize-lines: 20 |
| | | :emphasize-lines: 22 |
| | | :language: python |
| | | |
| | | Only the highlighted line needs to be added. |
| | |
| | | .. literalinclude:: src/installation/setup.py |
| | | :language: python |
| | | :lineno-match: |
| | | :lines: 22-26 |
| | | :lines: 24-28 |
| | | |
| | | .. literalinclude:: src/installation/setup.py |
| | | :language: python |
| | | :lineno-match: |
| | | :lines: 46-48 |
| | | :lines: 48-50 |
| | | |
| | | |
| | | .. _running_tests: |
| | |
| | | |
| | | zodbconn.uri = file://%(here)s/Data.fs?connection_cache_size=20000 |
| | | |
| | | retry.attempts = 3 |
| | | |
| | | # By default, the toolbar only appears for clients from IP addresses |
| | | # '127.0.0.1' and '::1'. |
| | | # debugtoolbar.hosts = 127.0.0.1 ::1 |
| | |
| | | |
| | | zodbconn.uri = file://%(here)s/Data.fs?connection_cache_size=20000 |
| | | |
| | | retry.attempts = 3 |
| | | |
| | | ### |
| | | # wsgi server configuration |
| | | ### |
| | |
| | | CHANGES = f.read() |
| | | |
| | | requires = [ |
| | | 'pyramid', |
| | | 'plaster_pastedeploy', |
| | | 'pyramid >= 1.9a', |
| | | 'pyramid_chameleon', |
| | | 'pyramid_debugtoolbar', |
| | | 'pyramid_retry', |
| | | 'pyramid_tm', |
| | | 'pyramid_zodbconn', |
| | | 'transaction', |
| | |
| | | 'sosecret', callback=groupfinder, hashalg='sha512') |
| | | authz_policy = ACLAuthorizationPolicy() |
| | | config = Configurator(root_factory=root_factory, settings=settings) |
| | | settings = config.get_settings() |
| | | settings['tm.manager_hook'] = 'pyramid_tm.explicit_manager' |
| | | config.set_authentication_policy(authn_policy) |
| | | config.set_authorization_policy(authz_policy) |
| | | config.include('pyramid_chameleon') |
| | | config.include('pyramid_tm') |
| | | config.include('pyramid_retry') |
| | | config.include('pyramid_zodbconn') |
| | | config.add_static_view('static', 'static', cache_max_age=3600) |
| | | config.scan() |
| | |
| | | |
| | | - Upgrade packaging tools. |
| | | |
| | | env/bin/pip install --upgrade pip setuptools wheel |
| | | env/bin/pip install --upgrade pip setuptools |
| | | |
| | | - Install the project in editable mode with its testing requirements. |
| | | |
| | |
| | | |
| | | zodbconn.uri = file://%(here)s/Data.fs?connection_cache_size=20000 |
| | | |
| | | retry.attempts = 3 |
| | | |
| | | # By default, the toolbar only appears for clients from IP addresses |
| | | # '127.0.0.1' and '::1'. |
| | | # debugtoolbar.hosts = 127.0.0.1 ::1 |
| | |
| | | |
| | | zodbconn.uri = file://%(here)s/Data.fs?connection_cache_size=20000 |
| | | |
| | | retry.attempts = 3 |
| | | |
| | | ### |
| | | # wsgi server configuration |
| | | ### |
| | |
| | | CHANGES = f.read() |
| | | |
| | | requires = [ |
| | | 'pyramid', |
| | | 'plaster_pastedeploy', |
| | | 'pyramid >= 1.9a', |
| | | 'pyramid_chameleon', |
| | | 'pyramid_debugtoolbar', |
| | | 'pyramid_retry', |
| | | 'pyramid_tm', |
| | | 'pyramid_zodbconn', |
| | | 'transaction', |
| | |
| | | """ This function returns a Pyramid WSGI application. |
| | | """ |
| | | config = Configurator(root_factory=root_factory, settings=settings) |
| | | settings = config.get_settings() |
| | | settings['tm.manager_hook'] = 'pyramid_tm.explicit_manager' |
| | | config.include('pyramid_chameleon') |
| | | config.include('pyramid_tm') |
| | | config.include('pyramid_retry') |
| | | config.include('pyramid_zodbconn') |
| | | config.add_static_view('static', 'static', cache_max_age=3600) |
| | | config.scan() |
| | |
| | | |
| | | - Upgrade packaging tools. |
| | | |
| | | env/bin/pip install --upgrade pip setuptools wheel |
| | | env/bin/pip install --upgrade pip setuptools |
| | | |
| | | - Install the project in editable mode with its testing requirements. |
| | | |
| | |
| | | |
| | | zodbconn.uri = file://%(here)s/Data.fs?connection_cache_size=20000 |
| | | |
| | | retry.attempts = 3 |
| | | |
| | | # By default, the toolbar only appears for clients from IP addresses |
| | | # '127.0.0.1' and '::1'. |
| | | # debugtoolbar.hosts = 127.0.0.1 ::1 |
| | |
| | | |
| | | zodbconn.uri = file://%(here)s/Data.fs?connection_cache_size=20000 |
| | | |
| | | retry.attempts = 3 |
| | | |
| | | ### |
| | | # wsgi server configuration |
| | | ### |
| | |
| | | CHANGES = f.read() |
| | | |
| | | requires = [ |
| | | 'pyramid', |
| | | 'plaster_pastedeploy', |
| | | 'pyramid >= 1.9a', |
| | | 'pyramid_chameleon', |
| | | 'pyramid_debugtoolbar', |
| | | 'pyramid_retry', |
| | | 'pyramid_tm', |
| | | 'pyramid_zodbconn', |
| | | 'transaction', |
| | |
| | | """ This function returns a Pyramid WSGI application. |
| | | """ |
| | | config = Configurator(root_factory=root_factory, settings=settings) |
| | | settings = config.get_settings() |
| | | settings['tm.manager_hook'] = 'pyramid_tm.explicit_manager' |
| | | config.include('pyramid_chameleon') |
| | | config.include('pyramid_tm') |
| | | config.include('pyramid_retry') |
| | | config.include('pyramid_zodbconn') |
| | | config.add_static_view('static', 'static', cache_max_age=3600) |
| | | config.scan() |
| | |
| | | |
| | | - Upgrade packaging tools. |
| | | |
| | | env/bin/pip install --upgrade pip setuptools wheel |
| | | env/bin/pip install --upgrade pip setuptools |
| | | |
| | | - Install the project in editable mode with its testing requirements. |
| | | |
| | |
| | | |
| | | zodbconn.uri = file://%(here)s/Data.fs?connection_cache_size=20000 |
| | | |
| | | retry.attempts = 3 |
| | | |
| | | # By default, the toolbar only appears for clients from IP addresses |
| | | # '127.0.0.1' and '::1'. |
| | | # debugtoolbar.hosts = 127.0.0.1 ::1 |
| | |
| | | |
| | | zodbconn.uri = file://%(here)s/Data.fs?connection_cache_size=20000 |
| | | |
| | | retry.attempts = 3 |
| | | |
| | | ### |
| | | # wsgi server configuration |
| | | ### |
| | |
| | | CHANGES = f.read() |
| | | |
| | | requires = [ |
| | | 'pyramid', |
| | | 'plaster_pastedeploy', |
| | | 'pyramid >= 1.9a', |
| | | 'pyramid_chameleon', |
| | | 'pyramid_debugtoolbar', |
| | | 'pyramid_retry', |
| | | 'pyramid_tm', |
| | | 'pyramid_zodbconn', |
| | | 'transaction', |
| | |
| | | """ This function returns a Pyramid WSGI application. |
| | | """ |
| | | config = Configurator(root_factory=root_factory, settings=settings) |
| | | settings = config.get_settings() |
| | | settings['tm.manager_hook'] = 'pyramid_tm.explicit_manager' |
| | | config.include('pyramid_chameleon') |
| | | config.include('pyramid_tm') |
| | | config.include('pyramid_retry') |
| | | config.include('pyramid_zodbconn') |
| | | config.add_static_view('static', 'static', cache_max_age=3600) |
| | | config.scan() |
| | |
| | | |
| | | zodbconn.uri = file://%(here)s/Data.fs?connection_cache_size=20000 |
| | | |
| | | retry.attempts = 3 |
| | | |
| | | # By default, the toolbar only appears for clients from IP addresses |
| | | # '127.0.0.1' and '::1'. |
| | | # debugtoolbar.hosts = 127.0.0.1 ::1 |
| | |
| | | |
| | | zodbconn.uri = file://%(here)s/Data.fs?connection_cache_size=20000 |
| | | |
| | | retry.attempts = 3 |
| | | |
| | | ### |
| | | # wsgi server configuration |
| | | ### |
| | |
| | | CHANGES = f.read() |
| | | |
| | | requires = [ |
| | | 'pyramid', |
| | | 'plaster_pastedeploy', |
| | | 'pyramid >= 1.9a', |
| | | 'pyramid_chameleon', |
| | | 'pyramid_debugtoolbar', |
| | | 'pyramid_retry', |
| | | 'pyramid_tm', |
| | | 'pyramid_zodbconn', |
| | | 'transaction', |
| | |
| | | 'sosecret', callback=groupfinder, hashalg='sha512') |
| | | authz_policy = ACLAuthorizationPolicy() |
| | | config = Configurator(root_factory=root_factory, settings=settings) |
| | | settings = config.get_settings() |
| | | settings['tm.manager_hook'] = 'pyramid_tm.explicit_manager' |
| | | config.set_authentication_policy(authn_policy) |
| | | config.set_authorization_policy(authz_policy) |
| | | config.include('pyramid_chameleon') |
| | | config.include('pyramid_tm') |
| | | config.include('pyramid_retry') |
| | | config.include('pyramid_zodbconn') |
| | | config.add_static_view('static', 'static', cache_max_age=3600) |
| | | config.scan() |
| | |
| | | |
| | | zodbconn.uri = file://%(here)s/Data.fs?connection_cache_size=20000 |
| | | |
| | | retry.attempts = 3 |
| | | |
| | | # By default, the toolbar only appears for clients from IP addresses |
| | | # '127.0.0.1' and '::1'. |
| | | # debugtoolbar.hosts = 127.0.0.1 ::1 |
| | |
| | | |
| | | zodbconn.uri = file://%(here)s/Data.fs?connection_cache_size=20000 |
| | | |
| | | retry.attempts = 3 |
| | | |
| | | ### |
| | | # wsgi server configuration |
| | | ### |
| | |
| | | CHANGES = f.read() |
| | | |
| | | requires = [ |
| | | 'pyramid', |
| | | 'plaster_pastedeploy', |
| | | 'pyramid >= 1.9a', |
| | | 'pyramid_chameleon', |
| | | 'pyramid_debugtoolbar', |
| | | 'pyramid_retry', |
| | | 'pyramid_tm', |
| | | 'pyramid_zodbconn', |
| | | 'transaction', |
| | |
| | | """ This function returns a Pyramid WSGI application. |
| | | """ |
| | | config = Configurator(root_factory=root_factory, settings=settings) |
| | | settings = config.get_settings() |
| | | settings['tm.manager_hook'] = 'pyramid_tm.explicit_manager' |
| | | config.include('pyramid_chameleon') |
| | | config.include('pyramid_tm') |
| | | config.include('pyramid_retry') |
| | | config.include('pyramid_zodbconn') |
| | | config.add_static_view('static', 'static', cache_max_age=3600) |
| | | config.scan() |
| | |
| | | the file ``development.ini`` and add the highlighted line below: |
| | | |
| | | .. literalinclude:: src/authentication/development.ini |
| | | :lines: 17-19 |
| | | :lines: 19-21 |
| | | :emphasize-lines: 3 |
| | | :lineno-match: |
| | | :language: ini |
| | |
| | | open ``production.ini`` and add a different secret: |
| | | |
| | | .. literalinclude:: src/authentication/production.ini |
| | | :lines: 15-17 |
| | | :lines: 17-19 |
| | | :emphasize-lines: 3 |
| | | :lineno-match: |
| | | :language: ini |
| | |
| | | .. literalinclude:: src/models/tutorial/models/__init__.py |
| | | :linenos: |
| | | :language: py |
| | | :emphasize-lines: 10,11 |
| | | :emphasize-lines: 8,9 |
| | | |
| | | Here we align our imports with the names of the models, ``Page`` and ``User``. |
| | | |
| | |
| | | .. literalinclude:: src/installation/setup.py |
| | | :language: python |
| | | :lineno-match: |
| | | :lines: 22-26 |
| | | :lines: 24-28 |
| | | |
| | | .. literalinclude:: src/installation/setup.py |
| | | :language: python |
| | | :lineno-match: |
| | | :lines: 46-48 |
| | | :lines: 48-50 |
| | | |
| | | |
| | | .. _sql_running_tests: |
| | |
| | | |
| | | - Upgrade packaging tools. |
| | | |
| | | env/bin/pip install --upgrade pip setuptools wheel |
| | | env/bin/pip install --upgrade pip setuptools |
| | | |
| | | - Install the project in editable mode with its testing requirements. |
| | | |
| | |
| | | |
| | | sqlalchemy.url = sqlite:///%(here)s/tutorial.sqlite |
| | | |
| | | retry.attempts = 3 |
| | | |
| | | auth.secret = seekrit |
| | | |
| | | # By default, the toolbar only appears for clients from IP addresses |
| | |
| | | |
| | | sqlalchemy.url = sqlite:///%(here)s/tutorial.sqlite |
| | | |
| | | retry.attempts = 3 |
| | | |
| | | auth.secret = real-seekrit |
| | | |
| | | ### |
| | |
| | | requires = [ |
| | | 'bcrypt', |
| | | 'docutils', |
| | | 'pyramid', |
| | | 'pyramid_jinja2', |
| | | 'plaster_pastedeploy', |
| | | 'pyramid >= 1.9a', |
| | | 'pyramid_debugtoolbar', |
| | | 'pyramid_jinja2', |
| | | 'pyramid_retry', |
| | | 'pyramid_tm', |
| | | 'SQLAlchemy', |
| | | 'transaction', |
| | |
| | | # use pyramid_tm to hook the transaction lifecycle to the request |
| | | config.include('pyramid_tm') |
| | | |
| | | # use pyramid_retry to retry a request when transient exceptions occur |
| | | config.include('pyramid_retry') |
| | | |
| | | session_factory = get_session_factory(get_engine(settings)) |
| | | config.registry['dbsession_factory'] = session_factory |
| | | |
| | |
| | | |
| | | - Upgrade packaging tools. |
| | | |
| | | env/bin/pip install --upgrade pip setuptools wheel |
| | | env/bin/pip install --upgrade pip setuptools |
| | | |
| | | - Install the project in editable mode with its testing requirements. |
| | | |
| | |
| | | |
| | | sqlalchemy.url = sqlite:///%(here)s/tutorial.sqlite |
| | | |
| | | retry.attempts = 3 |
| | | |
| | | auth.secret = seekrit |
| | | |
| | | # By default, the toolbar only appears for clients from IP addresses |
| | |
| | | |
| | | sqlalchemy.url = sqlite:///%(here)s/tutorial.sqlite |
| | | |
| | | retry.attempts = 3 |
| | | |
| | | auth.secret = real-seekrit |
| | | |
| | | ### |
| | |
| | | requires = [ |
| | | 'bcrypt', |
| | | 'docutils', |
| | | 'pyramid', |
| | | 'pyramid_jinja2', |
| | | 'plaster_pastedeploy', |
| | | 'pyramid >= 1.9a', |
| | | 'pyramid_debugtoolbar', |
| | | 'pyramid_jinja2', |
| | | 'pyramid_retry', |
| | | 'pyramid_tm', |
| | | 'SQLAlchemy', |
| | | 'transaction', |
| | |
| | | # use pyramid_tm to hook the transaction lifecycle to the request |
| | | config.include('pyramid_tm') |
| | | |
| | | # use pyramid_retry to retry a request when transient exceptions occur |
| | | config.include('pyramid_retry') |
| | | |
| | | session_factory = get_session_factory(get_engine(settings)) |
| | | config.registry['dbsession_factory'] = session_factory |
| | | |
| | |
| | | |
| | | - Upgrade packaging tools. |
| | | |
| | | env/bin/pip install --upgrade pip setuptools wheel |
| | | env/bin/pip install --upgrade pip setuptools |
| | | |
| | | - Install the project in editable mode with its testing requirements. |
| | | |
| | |
| | | |
| | | sqlalchemy.url = sqlite:///%(here)s/tutorial.sqlite |
| | | |
| | | retry.attempts = 3 |
| | | |
| | | # By default, the toolbar only appears for clients from IP addresses |
| | | # '127.0.0.1' and '::1'. |
| | | # debugtoolbar.hosts = 127.0.0.1 ::1 |
| | |
| | | |
| | | sqlalchemy.url = sqlite:///%(here)s/tutorial.sqlite |
| | | |
| | | retry.attempts = 3 |
| | | |
| | | ### |
| | | # wsgi server configuration |
| | | ### |
| | |
| | | CHANGES = f.read() |
| | | |
| | | requires = [ |
| | | 'pyramid', |
| | | 'pyramid_jinja2', |
| | | 'plaster_pastedeploy', |
| | | 'pyramid >= 1.9a', |
| | | 'pyramid_debugtoolbar', |
| | | 'pyramid_jinja2', |
| | | 'pyramid_retry', |
| | | 'pyramid_tm', |
| | | 'SQLAlchemy', |
| | | 'transaction', |
| | |
| | | # use pyramid_tm to hook the transaction lifecycle to the request |
| | | config.include('pyramid_tm') |
| | | |
| | | # use pyramid_retry to retry a request when transient exceptions occur |
| | | config.include('pyramid_retry') |
| | | |
| | | session_factory = get_session_factory(get_engine(settings)) |
| | | config.registry['dbsession_factory'] = session_factory |
| | | |
| | |
| | | |
| | | - Upgrade packaging tools. |
| | | |
| | | env/bin/pip install --upgrade pip setuptools wheel |
| | | env/bin/pip install --upgrade pip setuptools |
| | | |
| | | - Install the project in editable mode with its testing requirements. |
| | | |
| | |
| | | |
| | | sqlalchemy.url = sqlite:///%(here)s/tutorial.sqlite |
| | | |
| | | retry.attempts = 3 |
| | | |
| | | # By default, the toolbar only appears for clients from IP addresses |
| | | # '127.0.0.1' and '::1'. |
| | | # debugtoolbar.hosts = 127.0.0.1 ::1 |
| | |
| | | |
| | | sqlalchemy.url = sqlite:///%(here)s/tutorial.sqlite |
| | | |
| | | retry.attempts = 3 |
| | | |
| | | ### |
| | | # wsgi server configuration |
| | | ### |
| | |
| | | CHANGES = f.read() |
| | | |
| | | requires = [ |
| | | 'pyramid', |
| | | 'pyramid_jinja2', |
| | | 'plaster_pastedeploy', |
| | | 'pyramid >= 1.9a', |
| | | 'pyramid_debugtoolbar', |
| | | 'pyramid_jinja2', |
| | | 'pyramid_retry', |
| | | 'pyramid_tm', |
| | | 'SQLAlchemy', |
| | | 'transaction', |
| | |
| | | # use pyramid_tm to hook the transaction lifecycle to the request |
| | | config.include('pyramid_tm') |
| | | |
| | | # use pyramid_retry to retry a request when transient exceptions occur |
| | | config.include('pyramid_retry') |
| | | |
| | | session_factory = get_session_factory(get_engine(settings)) |
| | | config.registry['dbsession_factory'] = session_factory |
| | | |
| | |
| | | |
| | | - Upgrade packaging tools. |
| | | |
| | | env/bin/pip install --upgrade pip setuptools wheel |
| | | env/bin/pip install --upgrade pip setuptools |
| | | |
| | | - Install the project in editable mode with its testing requirements. |
| | | |
| | |
| | | |
| | | sqlalchemy.url = sqlite:///%(here)s/tutorial.sqlite |
| | | |
| | | retry.attempts = 3 |
| | | |
| | | # By default, the toolbar only appears for clients from IP addresses |
| | | # '127.0.0.1' and '::1'. |
| | | # debugtoolbar.hosts = 127.0.0.1 ::1 |
| | |
| | | |
| | | sqlalchemy.url = sqlite:///%(here)s/tutorial.sqlite |
| | | |
| | | retry.attempts = 3 |
| | | |
| | | ### |
| | | # wsgi server configuration |
| | | ### |
| | |
| | | |
| | | requires = [ |
| | | 'bcrypt', |
| | | 'pyramid', |
| | | 'pyramid_jinja2', |
| | | 'plaster_pastedeploy', |
| | | 'pyramid >= 1.9a', |
| | | 'pyramid_debugtoolbar', |
| | | 'pyramid_jinja2', |
| | | 'pyramid_retry', |
| | | 'pyramid_tm', |
| | | 'SQLAlchemy', |
| | | 'transaction', |
| | |
| | | """ This function returns a Pyramid WSGI application. |
| | | """ |
| | | config = Configurator(settings=settings) |
| | | settings = config.get_settings() |
| | | settings['tm.manager_hook'] = 'pyramid_tm.explicit_manager' |
| | | config.include('pyramid_jinja2') |
| | | config.include('.models') |
| | | config.include('.routes') |
| | |
| | | # use pyramid_tm to hook the transaction lifecycle to the request |
| | | config.include('pyramid_tm') |
| | | |
| | | # use pyramid_retry to retry a request when transient exceptions occur |
| | | config.include('pyramid_retry') |
| | | |
| | | session_factory = get_session_factory(get_engine(settings)) |
| | | config.registry['dbsession_factory'] = session_factory |
| | | |
| | |
| | | |
| | | - Upgrade packaging tools. |
| | | |
| | | env/bin/pip install --upgrade pip setuptools wheel |
| | | env/bin/pip install --upgrade pip setuptools |
| | | |
| | | - Install the project in editable mode with its testing requirements. |
| | | |
| | |
| | | |
| | | sqlalchemy.url = sqlite:///%(here)s/tutorial.sqlite |
| | | |
| | | retry.attempts = 3 |
| | | |
| | | auth.secret = seekrit |
| | | |
| | | # By default, the toolbar only appears for clients from IP addresses |
| | |
| | | |
| | | sqlalchemy.url = sqlite:///%(here)s/tutorial.sqlite |
| | | |
| | | retry.attempts = 3 |
| | | |
| | | auth.secret = real-seekrit |
| | | |
| | | ### |
| | |
| | | requires = [ |
| | | 'bcrypt', |
| | | 'docutils', |
| | | 'pyramid', |
| | | 'pyramid_jinja2', |
| | | 'plaster_pastedeploy', |
| | | 'pyramid >= 1.9a', |
| | | 'pyramid_debugtoolbar', |
| | | 'pyramid_jinja2', |
| | | 'pyramid_retry', |
| | | 'pyramid_tm', |
| | | 'SQLAlchemy', |
| | | 'transaction', |
| | |
| | | # use pyramid_tm to hook the transaction lifecycle to the request |
| | | config.include('pyramid_tm') |
| | | |
| | | # use pyramid_retry to retry a request when transient exceptions occur |
| | | config.include('pyramid_retry') |
| | | |
| | | session_factory = get_session_factory(get_engine(settings)) |
| | | config.registry['dbsession_factory'] = session_factory |
| | | |
| | |
| | | |
| | | - Upgrade packaging tools. |
| | | |
| | | env/bin/pip install --upgrade pip setuptools wheel |
| | | env/bin/pip install --upgrade pip setuptools |
| | | |
| | | - Install the project in editable mode with its testing requirements. |
| | | |
| | |
| | | |
| | | sqlalchemy.url = sqlite:///%(here)s/tutorial.sqlite |
| | | |
| | | retry.attempts = 3 |
| | | |
| | | # By default, the toolbar only appears for clients from IP addresses |
| | | # '127.0.0.1' and '::1'. |
| | | # debugtoolbar.hosts = 127.0.0.1 ::1 |
| | |
| | | |
| | | sqlalchemy.url = sqlite:///%(here)s/tutorial.sqlite |
| | | |
| | | retry.attempts = 3 |
| | | |
| | | ### |
| | | # wsgi server configuration |
| | | ### |
| | |
| | | requires = [ |
| | | 'bcrypt', |
| | | 'docutils', |
| | | 'pyramid', |
| | | 'pyramid_jinja2', |
| | | 'plaster_pastedeploy', |
| | | 'pyramid >= 1.9a', |
| | | 'pyramid_debugtoolbar', |
| | | 'pyramid_jinja2', |
| | | 'pyramid_retry', |
| | | 'pyramid_tm', |
| | | 'SQLAlchemy', |
| | | 'transaction', |
| | |
| | | # use pyramid_tm to hook the transaction lifecycle to the request |
| | | config.include('pyramid_tm') |
| | | |
| | | # use pyramid_retry to retry a request when transient exceptions occur |
| | | config.include('pyramid_retry') |
| | | |
| | | session_factory = get_session_factory(get_engine(settings)) |
| | | config.registry['dbsession_factory'] = session_factory |
| | | |