skip to navigation
skip to content

cromlech.dawnlight 0.7

Dawnlight publisher for Cromlech applications.

Downloads ↓

Introduction

This package provides a publication mechanism based on dawnlight for cromlech stack.

Publisher

The Publisher is a component adapting a IDawnlightApplication and a request.

Getting the publisher as an adapters permits to use different publisher depending on the application.

Traversing

Three consumers are defined by default, in order of use:

  • traversal on attribute name
  • traversal on containement (__getitem__)
  • traversal using adaptation for context and request on cromlech.browser.Itraverser

You may add your own consumers through global registry.

Views

View use adapters for object, request on cromlech.browser.IHttpRenderer

Note that this is compatible dolmen.view

Changelog

0.7 (2014-03-13)

  • Added the ITracebackAware interface. It defines a component that can carry traceback information along.
  • The safeguard decorator now uses the ITracebackAware interface to push the traceback information to the exception ResponseFactory component.

0.6.2 (2012-05-27)

  • Fixed bug where the publish method was called with the wrong number of arguments, in case the error handling was deactivated.

0.6.1 (2012-05-15)

  • Fixed a bug when the script_name was a unicode string.

0.6 (2012-05-06)

  • Using now the last changes on the cromlech.browser package. Queried view components are IView providers and are rendered thanks to the IResponseFactory adaptation.
  • The publisher is no longer instantiated with a request and an application. It only takes the lookup utilities. The request is provided at publication time, with the root object.

0.5.1 (2012-04-15)

  • Errors and error views are now correctly located. Already located errors are not subject to any change. They simply need to provide Ilocation to avoid unwanted relocation.
  • keep original traceback info in PublicationErrorBubble

0.5 (2012-01-30)

  • cromlech.dawnlight now provides a custom ViewLookup components that is more flexible : trying to publish a view directly now works without the need of an extra "default view".

0.4.1 (2012-01-27)

  • Unicode paths were failing due to the transformation of the request path, through unquote and then the transformation to unicode. This has been fixed and tested.

0.4 (2012-01-24)

  • Error handling is now implemented as a decorator for the publish method. This allows more flexibility in the catching and rendering of errors. A base adapter is provided, adapting an exception to IHTTPResponse, using the query of an IHTTPRenderer.

    The adapter from IHTTPRenderer to IHTTPResponse has been modified accordingly and heavily commented as it was judged a bit cryptic by the newcomers.

0.3b4 (2012-01-11)

  • The lookup wrappers have now been modified to only be used on the lookup function passed to the ViewLookup component.

0.3b3 (2012-01-11)

  • We no longer inherit from ViewLookup to provide a base lookup method. This method can be simply passed to the constructor. 2 decorator-like functions have been added in utils allowing to wrap a basic lookup function to provide locatisation and/or protection.

    The protection wrapper is only available if the zope.security package is present as it uses the ProxyFactory mechanism.

  • Adapted the code and tests to the latest interfaces split made in cromlech.io and cromlech.browser.

0.3b2 (2011-11-23)

  • Now only attributes declared thanks to traversable directive are traversable ! This help keeping things under control.

    Note that it does not work like in Grok : it is a ONCE directive either you inherit it or you re-declare all attributes.

0.3b1 (2011-11-04)

  • url unquote path to unicode before traversing so content under a unicode key in a container is reached by traverser

0.3a3 (2011-09-07)

  • better re-raise of errors in publisher

0.3a2 (2011-09-07)

  • The error rendering now strips the original failing view of all its proxies, to avoid security proxies and other blocking proxies that can shadow the true result.

0.3a1 (2011-09-03)

  • Enhanced the IHTTPRenderer to IResult adapter to provide a comprehensive error handling. We can now bubble error in case of ComponentLookupErrors and we can provide renderers for other errors.

0.2b1 (2011-08-27)

  • Fixed and refined the publish method of the publisher.

0.2a4 (2011-08-25)

  • Cleaned up the IHTTPRenderer resolution to an IResult.
  • Added tests for all kind of errors during the publication.

0.2a3 (2011-08-25)

  • refactored publication process
  • ComponentLookupError in views are not hidden anymore

0.2a2 (2011-07-04)

  • Added a separated ZCML files to "grok" the IConsumer components.

0.2a1 (2011-07-02)

  • Using now dawnlight >= 0.13b2. The code has been modified accordingly.
  • Splitted the code into logical modules.

0.1a3 (2011-06-14)

Using dawlight >= 0.12b1 that remove bug with ending slash in path

0.1a2 (2011-05-16)

  • Made the lookups pluggable.
  • DawnlightPublisher is no longer a MultiAdapter. Now, it uses an adapter factory.

0.1a1 (2011-05-09)

Initial release

 
File Type Py Version Uploaded on Size # downloads
cromlech.dawnlight-0.7.tar.gz (md5) Source 2014-03-13 12KB 0