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
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file pyramid_weblayer-0.6.1.tar.gz
.
File metadata
- Download URL: pyramid_weblayer-0.6.1.tar.gz
- Upload date:
- Size: 8.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 71cac9827b5c91670bec14aa79446cd62a7366369eb37f1e626a0eaf24c9f2f9 |
|
MD5 | 341eaa7fc5004df5b5a561ad7cbbf2d9 |
|
BLAKE2b-256 | 9e9a7266f97a024b513d1bf4a9a3e9f533b3d17a3cdc90fa6090dc09015e2c01 |