Metadata-Version: 1.1
Name: rebecca.view
Version: 0.2
Summary: basic views for pyramid view
Home-page: https://github.com/rebeccaframework/rebecca.view
Author: Atsushi Odagiri
Author-email: aodagx@gmail.com
License: MIT
Description: .. contents::
        
        rebecca.view
        ==============
        
        ``rebecca.view`` is helper classes for pyramid views.
        
        BasicView methods and properties
        ------------------------------------------
        
        properties
        
        - ``context`` view context passed to constructor
        - ``request`` request passed to constructor
        - ``response`` response attribute of ``request``
        - ``body`` body attribute of ``request``
        
        methods
        
        - ``redirect(url)`` create HTTPFound object from url
        - ``redirect_route(route_name, **values)`` create HTTPFound object with route_url
        - ``action_dispatch`` call method named ``*_action`` with request param.
        
        
        Softification
        -------------------------
        
        ``Softification`` is context manager to replace Exceptions to the other Exceptions.
        
        ::
        
           with Softification(NoResultFound, HTTPNotFound):
               item = DBSession.query(Item).filter(Item.id==id).one()
        
        If ``one()`` method raises ``NoResultFound`` exception, the context manager catch that 
        and raises the HTTPNotFound exception.
        You can use tuple for target Exception classes.
        
        
        USAGE
        --------------
        
        BasicView
        ++++++++++++++++++
        
        To use ``BasicView``, inherit that simply.::
        
            class Greeting(BasicView):
                def __call__(self):
                    return self.redirect_route('top', v=1)
        
        Contributors
        ============
        
        - Atsushi Odagiri, Original Author
        
        Changelog
        =========
        
        0.2 (2013-03-11)
        --------------------
        
        - add softification API
        
        
        0.1 (2013-03-10)
        --------------------
        
        - first release
        
        
Platform: UNKNOWN
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.2
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Framework :: Pyramid
Classifier: License :: OSI Approved :: MIT License
