| Age | Commit message (Collapse) | Author |
|
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).
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
""" 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."""
|
|
|
|
|
|
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).
|
|
|
|
tests didn't work.
|
|
default_notfound_view functions into the ``repoze.bfg.view`` module
(moved from ``repoze.bfg.router``).
|
|
|
|
|
|
documentation were broken.
|
|
a path, a name, and a factory instead of a name, a matcher, a
generator, and a factory.
|
|
|
|
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.
|
|
docs.
|
|
|
|
|
|
|
|
|
|
``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.
|
|
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.
|
|
|
|
|
|
o They are stored as attributes of the ``Article``, rather than subitems.
|
|
produced by the matching route.
Thanks to leopay for the catch.
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
- Back to dev.
|
|
|
|
|
|
|
|
|