summaryrefslogtreecommitdiff
path: root/docs/tutorials/bfgwiki2
AgeCommit message (Collapse)Author
2009-11-10More usage of setup and teardown.Chris McDonough
2009-11-10TemplatesChris McDonough
--------- - Remove ``ez_setup.py`` and its import from all paster templates, samples, and tutorials for ``distribute`` compatibility. The documentation already explains how to install virtualenv (which will include some ``setuptools`` package), so these files, imports and usages were superfluous. Deprecations ------------ - The ``options`` kw arg to the ``repoze.bfg.router.make_app`` function is deprecated. In its place is the keyword argument ``settings``. The ``options`` keyword continues to work, and a deprecation warning is not emitted when it is detected. However, the paster templates, code samples, and documentation now make reference to ``settings`` rather than ``options``. This change/deprecation was mainly made for purposes of clarity and symmetry with the ``get_settings()`` API and dicussions of "settings" in various places in the docs: we want to use the same name to refer to the same thing everywhere.
2009-11-01- Fix various tutorials broken by 1.1a9 ``<route>`` directive changes.Chris McDonough
2009-11-01- Reinstate ``renderer`` alias for ``view_renderer`` in theChris McDonough
``<route>`` ZCML directive (in-the-wild 1.1a bw compat). - ``bfg_routesalchemy`` paster template: change ``<route>`` declarations: rename ``renderer`` attribute to ``view_renderer``. - In ``<route>`` declarations in tutorial ZCML, rename ``renderer`` attribute to ``view_renderer`` (fwd compat).
2009-10-30Update documentation after root factory changes.Chris McDonough
2009-10-15FeaturesChris McDonough
-------- - Add ``setUp`` and ``tearDown`` functions to the ``repoze.bfg.testing`` module. Using ``setUp`` in a test setup and ``tearDown`` in a test teardown is now the recommended way to do component registry setup and teardown. Previously, it was recommended that a single function named ``repoze.bfg.testing.cleanUp`` be called in both the test setup and tear down. ``repoze.bfg.testing.cleanUp`` still exists (and will exist "forever" due to its widespread use); it is now just an alias for ``repoze.bfg.testing.setUp`` and is nominally deprecated. - The BFG component registry is now available in view and event subscriber code as an attribute of the request ie. ``request.registry``. This fact is currently undocumented except for this note, because BFG developers never need to interact with the registry directly anywhere else. - The BFG component registry now inherits from ``dict``, meaning that it can optionally be used as a simple dictionary. *Component* registrations performed against it via e.g. ``registerUtility``, ``registerAdapter``, and similar API methods are kept in a completely separate namespace than its dict members, so using the its component API methods won't effect the keys and values in the dictionary namespace. Likewise, though the component registry "happens to be" a dictionary, use of mutating dictionary methods such as ``__setitem__`` will have no influence on any component registrations made against it. In other words, the registry object you obtain via e.g. ``repoze.bfg.threadlocal.get_current_registry`` or ``request.registry`` happens to be both a component registry and a dictionary, but using its component-registry API won't impact data added to it via its dictionary API and vice versa. This is a forward compatibility move based on the goals of "marco". Documentation ------------- - Various tutorial test modules updated to use ``repoze.bfg.testing.setUp`` and ``repoze.bfg.testing.tearDown`` methods in order to encourage this as best practice going forward. Backwards Incompatibilities --------------------------- - Importing ``getSiteManager`` and ``get_registry`` from ``repoze.bfg.registry`` is no longer supported. These imports were deprecated in repoze.bfg 1.0. Import of ``getSiteManager`` should be done as ``from zope.component import getSiteManager``. Import of ``get_registry`` should be done as ``from repoze.bfg.threadlocal import get_current_registry``. This was done to prevent a circular import dependency. - Code bases which alternately invoke both ``zope.testing.cleanup.cleanUp`` and ``repoze.bfg.testing.cleanUp`` (treating them equivalently, using them interchangeably) in the setUp/tearDown of unit tests will begin to experience test failures due to lack of test isolation. The "right" mechanism is ``repoze.bfg.testing.cleanUp`` (or the combination of ``repoze.bfg.testing.setUp`` and ``repoze.bfg.testing.tearDown``). but a good number of legacy codebases will use ``zope.testing.cleanup.cleanUp`` instead. We support ``zope.testing.cleanup.cleanUp`` but not in combination with ``repoze.bfg.testing.cleanUp`` in the same codebase. You should use one or the other test cleanup function in a single codebase, but not both. Internal -------- - Created new ``repoze.bfg.configuration`` module which assumes responsibilities previously held by the ``repoze.bfg.registry`` and ``repoze.bfg.router`` modules (avoid a circular import dependency). - The result of the ``zope.component.getSiteManager`` function in unit tests set up with ``repoze.bfg.testing.cleanUp`` or ``repoze.bfg.testing.setUp`` will be an instance of ``repoze.bfg.registry.Registry`` instead of the global ``zope.component.globalregistry.base`` registry. This also means that the threadlocal ZCA API functions such as ``getAdapter`` and ``getUtility`` as well as internal BFG machinery (such as ``model_url`` and ``route_url``) will consult this registry within unit tests. This is a forward compatibility move based on the goals of "marco". - Removed ``repoze.bfg.testing.addCleanUp`` function and associated module-scope globals. This was never an API.
2009-10-11Use 1.1 index.Chris McDonough
Explain where "request" comes from in templates.
2009-10-10Move to renderers.Chris McDonough
2009-10-10Move to renderers.Chris McDonough
2009-10-10Move to renderers. Add tests.Chris McDonough
2009-10-10Move to renderers.Chris McDonough
Add tests.
2009-10-09route -> static directive.Chris McDonough
2009-10-09Protip from elpargo.Chris McDonough
2009-10-09Fix ordering.Chris McDonough
2009-07-07SQLite.Chris McDonough
2009-07-06- Minor edits to tutorials for accuracy based on feedback.Chris McDonough
- Back to dev.
2009-07-05SpellingChris McDonough
2009-07-03Audit grammar in bfgwik2 tutorial.Chris McDonough
2009-07-02Use bfgsite index.Chris McDonough
2009-07-02Fix import.Chris McDonough
Use request.url as "referrer" as we're no longer redirecting.
2009-07-01Rendering.Chris McDonough
2009-07-01Renderings.Chris McDonough
2009-07-01- Deprecate the ``authentication_policy`` and ``authorization_policy``Chris McDonough
arguments to ``repoze.bfg.router.make_app``. Instead, developers should use the various authentication policy ZCML directives (``repozewho1authenticationpolicy``, ``remoteuserauthenticationpolicy`` and ``authtktauthenticationpolicy``) and the `aclauthorizationpolicy`` authorization policy directive as described in the changes to the "Security" narrative documentation chapter and the wiki tutorials.
2009-06-24Single arg style.Chris McDonough
2009-06-24Reverse ordering of args to route_url.Chris McDonough
2009-06-24- ``repoze.bfg`` no longer relies on the Routes package to interpretChris McDonough
URL paths.
2009-06-24Change the implementation and the signature for ``route_url``.Chris McDonough
2009-06-24- Use ``repoze.bfg.url.route_url`` API in tutorials rather than RoutesChris McDonough
``url_for`` API.
2009-06-23Update tutorials with new callback API.Chris McDonough
2009-06-23Reverse the order.Chris McDonough
2009-06-22Note non-runnable state.Chris McDonough
2009-06-22Note non-runnability.Chris McDonough
2009-06-22Make sure nose and coverage are installed.Chris McDonough
2009-06-22- Conditional documentation in installation section ("how to install aChris McDonough
Python interpreter").
2009-06-22Gardening.Chris McDonough
2009-06-22Back to *subpath in urldispatch tutorial.Chris McDonough
2009-06-19Edit.Chris McDonough
2009-06-18IForbiddenView utility directive -> forbidden zcml directiveChris McDonough
2009-06-18Change configure.zcml of authorization to use forbidden.Chris McDonough
Ignores.
2009-06-18Rejigger tutorial in the face of request-only default views.Chris McDonough
2009-06-18- The matchdict related to the matching of a Routes route is availableChris McDonough
on the request as the ``matchdict`` attribute: ``request.matchdict``. If no route matched, this attribute will be None.
2009-06-11Merge unifyroutesandtraversal branch into trunkChris McDonough
2009-06-02The wiki2 tutorial has no disc.Chris McDonough
2009-06-02use the same name for the FrontPage object when describing the views in the ↵Carlos de la Guardia
browser
2009-06-02fixed typoCarlos de la Guardia
2009-06-02change codeblock language on Windows example to use bat and stop coloring ↵Carlos de la Guardia
backslashes as escape sequences
2009-06-02corrected some mistakes in the mapping views sections and added more ↵Carlos de la Guardia
explanation text
2009-06-02fixed typoCarlos de la Guardia
2009-06-02fixed typoCarlos de la Guardia
2009-06-01was going to fix unclosed parentheses, but ended up refactoring sentence.Carlos de la Guardia