Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

basic views for pyramid view

Project Description


rebecca.view is helper classes for pyramid views.

BasicView methods and properties


  • context view context passed to constructor
  • request request passed to constructor
  • response response attribute of request
  • body body attribute of request


  • 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 is context manager to replace Exceptions to the other Exceptions.

with Softification(NoResultFound, HTTPNotFound):
    item = DBSession.query(Item).filter(

If one() method raises NoResultFound exception, the context manager catch that and raises the HTTPNotFound exception. You can use tuple for target Exception classes.



To use BasicView, inherit that simply.:

class Greeting(BasicView):
    def __call__(self):
        return self.redirect_route('top', v=1)


  • Atsushi Odagiri, Original Author


0.2 (2013-03-11)

  • add softification API

0.1 (2013-03-10)

  • first release
Release History

Release History

This version
History Node


History Node


Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
rebecca.view-0.2.tar.gz (3.8 kB) Copy SHA256 Checksum SHA256 Source Mar 11, 2013

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting