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
pyramid_weblayer-0.5.tar.gz
(8.7 kB
view details)
File details
Details for the file pyramid_weblayer-0.5.tar.gz
.
File metadata
- Download URL: pyramid_weblayer-0.5.tar.gz
- Upload date:
- Size: 8.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f7737da0b30842db2768d6c4da58569b0017a0afc2ee64bb4637bca57b60feda |
|
MD5 | fc41e0e694c8a82cee1f6d37f03adf43 |
|
BLAKE2b-256 | 02f977ac08b288651b86b8cf67c306f12fdd3a69ca7a9cba8f7d71fa73c4abb2 |