Package: repoze.bfg.skins
OverviewThis package provides a simple framework to integrate code with
templates and resources.See full documentation at:http://packages.python.org/repoze.bfg.skins/.AboutThe package is written and maintained byMalthe BorchandStefan Eletzhofer. Available as-is under the BSD
license.To contribute or get support for this package, please visit the
#repoze channel on freenode irc or write to therepoze-dev
mailinglist.Changelog0.22 (2011-04-07)Fix skin reloading for request-specific skins.0.21 (2011-04-01)Allow request-specific skin registration (using therequest_typeparameter to the skins directive). The request is retrieved from the
thread-local manager at lookup-time.Add imperative configuration utility method.0.20 (2009-12-14)Compatibility fixes for BFG 1.2.0.19 (2009-11-27)Use theMacFSEventsmodule instead ofpyfsevents.0.18 (2009-11-26)Added discovery support (Mac OS X and Linux).Allow hyphens in the skin expression translator.Do not set charset on binary responses.Add content length to static responses.0.17 (2009-11-16)Skin objects used as descriptors now pass on the class instance
dict as the keyword argument dictionary.Skin templates may now be used as macros.Make sure expression syntax is correct.0.16 (2009-11-14)Acquisition-like skin object lookup from within templates,
e.g.skin: main_templatewill try to acquire the object from
the current skin object path (if applicable), whileskin: /main_templatewill always use an absolute (direct) lookup.0.15 (2009-11-12)Makenameattribute public.Normalize path (ZCML does this, but we might be used
imperatively).Raise runtime-error if view is attempted registered for unknown
skin object (should never happen, but did because of an internal
bug).0.14 (2009-11-09)Look up skin object on call if object has not been resolved.Added index view registration option.UseChameleonegg.Pin package versions for testing.0.13 (2009-10-30)Rewrite. Backwards-compatibility broken.Migration path:Skins registration directive renamed to <bfg:skins>.To register views for skin objects, the <bfg:view> directive
should be used inside a <bfg:skins> declaration. See
documentation.Previous users should consult documentation for more information.Made compatible with repoze.bfg 1.1a4.Disusecomponent.adapts(unuseable in any BFG app), to make
compatible with repoze.bfg 1.1a6+.0.12 (2009-02-12)Added convenience methodget_skin_template_view. [malthe]Theget_skin_templatemethod now accepts an optionalrequest_typeparameter, which takes priority in
adaptation. [malthe]Theprovidesparameter has been retired; instead, aclassparameter may be provided. By default this is set to theSkinTemplateclass; to register a view, simply set it toSkinTemplateView(full module path required). [malthe]0.11 (2009-02-09)View permission is now only registered if a view must be
provided. [malthe]Multiple interfaces may be specified asprovides. [malthe]0.10 (2009-01-28)Added parametercontent_typewhich will set the content type
of the view response. [malthe]Addedmacrosattribute to the template object. [malthe]0.9 (2008-12-05)Updated signatures for skin template factory lookup
functions. [malthe]Added support for skin api methods. [malthe]0.8 (2008-12-05)ProvideISkinMacrounlessprovidesis set; however, always
provideISkinTemplate. Meanwhile, the macro accessor looks
only for skin templates registered for theISkinMacrointerface. [malthe]0.7 (2008-12-04)Ifprovidesis set, do not automatically provide theISkinTemplateinterface as well; this behavior made it
difficult to program cascading rendering schemes. [malthe]Keyword-arguments are now accepted by the utility methods for
rendering skin templates using Python. [malthe]Added security assertions to macro rendering function to prevent
infinite loop if a template tries to render itself. [malthe]0.6 (2008-12-03)Do not register macro components separately, but make them
available from themacroattribute of a skin
template. [malthe]0.5 (2008-12-03)Added component lookup scheme for the bound skin template object
which makes skin API components available usingget_<name>where <name> is the component name. [malthe]Restructured package and changed look up scheme for skin APIs and
macros. A symboltemplateis now available to skin templates;
from this object, methodsget_apiandget_macrocan be
used to look up skin APIs and macros, respectively. [malthe]Added render_skin_template_to_response and render_skin_template
methods for general template rendering. [fairwinds]0.4 (2008-11-13)Addednameattribute to skin template interface. [malthe]No longer providerepoze.bfg.interfaces.IViewby default; theprovidesattribute may now be used to specify an additional
interface which the skin templates will provide. [malthe]0.3 (2008-10-29)Fix performance issue where template objects would be instantiated
at every call. [malthe]Pass keyword arguments to skin template callable. [malthe]Instantiate page template directly. [malthe]0.2 (2008-10-03)Templates located in subdirectories are now named by replacing the
operating system path separator with a forward slash symbol (often
this will be the same character); before a dot ‘.’ was
used. [malthe]Added Template API base class. [malthe]RenamedIApitoITemplateAPI. [malthe]Template API components should adapt (context, request, template),
wheretemplateis the skin template object (such an API might
need to provide access to the template file itself, in order to
get a path to resources local to the template). [malthe]Addedrendermethod to skin template class to allow rendering
to a string instead of to a WebOb response. [malthe]Renamed package torepoze.bfg.skins[seletz]Added logic to allow registering and acquiring template API
components from templates. [malthe]Changed the Skin Template View to be a class, and added a minimal
interface ISkinTemplate to access the template path [seletz]Fixed a bug where we did not tear down the tests correctly
[seletz]Fixed bug where the INewRequest event handler would call templates
when checking for their existence [seletz]0.1 (2008-09-25)Initial release [malthe]Added support to dynamically register templates if they are added
to a registered template directory [seletz]