update src files and synch emphasize-lines for alchemy wiki tutorial
| | |
| | | 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 |
| | | |