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.tar.gz (8.1 kB view details)

Uploaded Source

File details

Details for the file pyramid_weblayer-0.6.tar.gz.

File metadata

File hashes

Hashes for pyramid_weblayer-0.6.tar.gz
Algorithm Hash digest
SHA256 1d020d722bfc66e7b0f008fdaf803174569f723ac6b3e176181bdbd19cf4f76c
MD5 7b285d4494008c62be8ebe3aa1b2083c
BLAKE2b-256 68944658cb97cde4bb415bcf5367da838b4fb1d9131284779baea8d3e6acf411

See more details on using hashes here.

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