Skip to main content

A re-factor of some parts of weblayer for use within Pyramid.

Project description

A re-factor of some elements of [weblayer][] for use within a [Pyramid][] app.

Provides a `validate_against_csrf` subscriber to validate incoming requests
against cross site request forgeries and an `add_underscore_translation`
subscriber that extends the template namespace with a `_()` function for
translating message strings.

## Tests

The tests pass using Python2.6 and Python3.2, e.g.:

$ nosetests --cover-package=pyramid_weblayer --cover-tests --with-doctest --with-coverage
............
Name Stmts Miss Cover Missing
-----------------------------------------------------------------------
pyramid_weblayer 6 0 100%
pyramid_weblayer.csrf 26 0 100%
pyramid_weblayer.i18n 12 0 100%
pyramid_weblayer.tests 0 0 100%
pyramid_weblayer.tests.test_csrf 89 0 100%
pyramid_weblayer.tests.test_integration 58 0 100%
pyramid_weblayer.utils 19 0 100%
-----------------------------------------------------------------------
TOTAL 210 0 100%
----------------------------------------------------------------------
Ran 16 tests in 0.400s

OK

[pyramid]: http://pypi.python.org/pypi/pyramid
[weblayer]: http://github.com/thruflo/weblayer

Project details


Download files

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

Source Distribution

pyramid_weblayer-0.6.1.tar.gz (8.1 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page