summaryrefslogtreecommitdiff
path: root/repoze
AgeCommit message (Collapse)Author
2009-09-20Remove comments.Chris McDonough
2009-09-20Make instance grokking work again.Chris McDonough
2009-09-20- The way ``bfg_view`` declarations are scanned for has been modified.Chris McDonough
This should have no external effects. - An object implementing the ``IRenderer`` interface (and ``ITemplateRenderer`, which is a subclass of ``IRenderer``) must now accept an extra ``system`` argument in its ``__call__`` method implementation. Values computed by the system (as opposed to by the view) are passed by the system in the ``system`` parameter, which will always be a dictionary. Keys in the dictionary include: ``view`` (the view object that returned the value), ``renderer_name`` (the template name or simple name of the renderer), ``context`` (the context object passed to the view), and ``request`` (the request object passed to the view). Previously only ITemplateRenderers received system arguments as elements inside the main ``value`` dictionary.
2009-09-20- Speed: do not register an ITraverserFactory in configure.zcml;Chris McDonough
instead rely on queryAdapter and a manual default to ModelGraphTraverser. - Speed: do not register an IContextURL in configure.zcml; instead rely on queryAdapter and a manual default to TraversalContextURL. - General speed microimprovements for helloworld benchmark: replace try/excepts with statements which use 'in' keyword.
2009-09-18Accept a traverser rather than a registry in _traverse.Chris McDonough
2009-09-18Cleanup.Chris McDonough
2009-09-18Compulsive import reorderings.Chris McDonough
2009-09-18Centralize resource_spec code.Chris McDonough
2009-09-17Move view-related helper functions from zcml.py to view.py.Chris McDonough
2009-09-17- Add a ``repoze.bfg.url.static_url`` API which is capable ofChris McDonough
generating URLs to static resources defined by the ``<static>`` ZCML directive. See the "Views" narrative chapter's section titled "Generating Static Resource URLs" for more information.
2009-09-17- Add a ``string`` renderer. This renderer converts a non-ResponseChris McDonough
return value of any view callble into a string. It is documented in the "Views" narrative chapter.
2009-09-16- Give the ``route`` ZCML directive the ``view_attr`` andChris McDonough
``view_renderer`` parameters (bring up to speed with 1.1a3 features). These can also be spelled as ``attr`` and ``renderer``.
2009-09-16- The ``repoze.bfg.testing.registerDummyRenderer`` API has beenChris McDonough
deprecated in favor of ``repoze.bfg.testing.registerTemplateRenderer``. A deprecation warning is *not* issued at import time for the former name; it will exist "forever". - The ``repoze.bfg.templating.renderer_from_cache`` function has been moved to ``repoze.bfg.renderer.template_renderer_factory``. This was never an API, but code in the wild was spotted that used it. A deprecation warning is issued at import time for the former. - Better error message when a wrapper view returns None.
2009-09-16Fix bug in dummy renderer "implementation" method.Chris McDonough
Provide a b/c shim for the "templating" module (code in the wild imports).
2009-09-16Coverage.Chris McDonough
2009-09-16Test name.Chris McDonough
2009-09-16Had a stray .pyc sitting around.Chris McDonough
2009-09-16Checkpoint. Not 100% test coverage.Chris McDonough
2009-09-14- The ``view`` attribute of the ``view`` ZCML directive is no longerChris McDonough
required if the ZCML directive has a ``template`` attribute.
2009-09-14Provide "wrapped_view" as well in the outer wrapper request.Chris McDonough
2009-09-14Provide wrapper behavior to bfg_view decorator.Chris McDonough
2009-09-14- A ZCML ``view`` directive (and the associated ``bfg_view``Chris McDonough
decorator) can now accept a "wrapper" value. If a "wrapper" value is supplied, it is the value of a separate view's *name* attribute. When a view with a ``wrapper`` attribute is rendered, the "inner" view is first rendered normally. Its body is then attached to the request as "wrapped_body", and then a wrapper view name is looked up and rendered (using ``repoze.bfg.render_view_to_response``), passed the request and the context. The wrapper view is assumed to do something sensible with ``request.wrapped_body``, usually inserting its structure into some other rendered template. This feature makes it possible to specify (potentially nested) "owrap" relationships between views using only ZCML or decorators (as opposed always using ZPT METAL and analogues to wrap view renderings in outer wrappers).
2009-09-14- A ZCML ``view`` directive (and the associated ``bfg_view``Chris McDonough
decorator) can now accept an "attr" value. If an "attr" value is supplied, it is considered a method named of the view object to be called when the response is required. This is typically only good for views that are classes or instances (not so useful for functions, as functions typically have no methods other than ``__call__``). - A ZCML ``view`` directive (and the associated ``bfg_view`` decorator) can now accept a "template" value. If a "template" value is supplied, and the view callable returns a dictionary, the associated template is rendered with the dictionary as keyword arguments.
2009-09-06Docs URLs changed.Chris McDonough
2009-09-06Coverage.Chris McDonough
2009-09-06Note version so I can remember.Chris McDonough
2009-09-06- The ``registry_manager`` backwards compatibility alias importableChris McDonough
from "repoze.bfg.registry", deprecated since repoze.bfg 0.9 has been removed. If you are tring to use the registry manager within a debug script of your own, use a combination of the "repoze.bfg.paster.get_app" and "repoze.bfg.scripting.get_root" APIs instead.
2009-09-06Remove 0.9 deprecations.Chris McDonough
2009-09-06Merge multiview2 branch to HEAD.Chris McDonough
2009-08-28Coverage.Chris McDonough
2009-08-28Coverage.Chris McDonough
2009-08-27Add package_name function.Chris McDonough
""" If this function is passed a module, return the dotted Python package name of the package in which the module lives. If this function is passed a package, return the dotted Python package name of the package itself."""
2009-08-27Deal with Windows.Chris McDonough
2009-08-27Rebase module-relative static views on the nearest package path.Malthe Borch
2009-08-25- The ``repoze.bfg.view.static`` class now accepts a string as itsChris McDonough
first argument ("root_dir") that represents a package-relative name e.g. ``somepackage:foo/bar/static``. This is now the preferred mechanism for spelling package-relative static paths using this class. A ``package_name`` keyword argument has been left around for backwards compatibility. If it is supplied, it will be honored. - Fixed documentation for ``repoze.bfg.view.static`` (in narrative ``Views`` chapter).
2009-08-24Added ZCML directive to serve up static files from a directory.Malthe Borch
2009-08-20- "tests" module removed from the bfg_alchemy paster template; theseChris McDonough
tests didn't work.
2009-08-14- Move (non-API) default_view, default_forbidden_view, andChris McDonough
default_notfound_view functions into the ``repoze.bfg.view`` module (moved from ``repoze.bfg.router``).
2009-08-14Coverage.Chris McDonough
2009-08-14Coverage.Chris McDonough
2009-08-09- Change urldispatch internals: Route object is now constructed usingChris McDonough
a path, a name, and a factory instead of a name, a matcher, a generator, and a factory.
2009-08-04Reverse.Chris McDonough
2009-08-04- Allow ``repoze.bfg.traversal.find_interface`` API to use a classChris McDonough
object as the argument to compare against the ``model`` passed in. This means you can now do ``find_interface(model, SomeClass)`` and the first object which is found in the lineage which has ``SomeClass`` as its class (or the first object found which has ``SomeClass`` as any of its superclasses) will be returned.
2009-07-28- Fixed documentation bugs related to forget and remember in security APIChris McDonough
docs.
2009-07-22- Added support for ``has_resource``, ``resource_isdir``, andChris McDonough
``resource_listdir`` to the resource "OverrideProvider"; this fixes a bug with a symptom that a file could not be overridden in a resource directory unless a file with the same name existed in the original directory being overridden.
2009-07-22Actually, now that I think about it, this is probably wrong. I'm revertingChris Rossi
this change for now. What I observed is that in a ZODB based app, the ZODB connection was closed when I let the closer fall out of scope. I see from examining the code, though, that this is a side effect of the environ that the closer hangs on to getting deleted. There is nothing here that pops the registry when the closer is deleted. You still have to call the closer for that to happen.
2009-07-22Document close on '__del__' behavior of closer.Chris Rossi
2009-07-09- Added a workaround for a bug in Python 2.6, 2.6.1, and 2.6.2 havingChris McDonough
to do with a recursion error in the mimetypes module when trying to serve static files from Paste's FileApp: http://bugs.python.org/issue5853. Symptom: File "/usr/lib/python2.6/mimetypes.py", line 244, in guess_type return guess_type(url, strict) RuntimeError: maximum recursion depth exceeded. Thanks to Armin Ronacher for identifying the symptom and pointing out a fix.
2009-07-07Reverse.Chris McDonough
2009-07-03API docs audit.Chris McDonough