Skip to main content
Pyramid JSRoutes
================

A pyramid routes composer for javascript.

Installation
------------

pip install -U pyramid-jsroutes

Usage
-----

Include the package in your Pyramid app's main function:

```python
def main():
...
config.include('jsroutes')
...
return config.make_wsgi_app()
```

this will make `jsroutes` available to all your template context, then you can use it like:

<script type="text/javascript">${jsroutes|n}</script>

then you can start composing your Pyramid routes from javascript like:

```javascript
JSROUTES.blog_post(1) // /posts/1
```

Settings
--------

By default it'll only collect the routes once and store it in the registry but you can force reloading everytime for development by settings the following settings:

jsroutes.reload_routes = true

Note
----

Each time your modify your Pyramid routes, you need to refresh your page to refetch the updated routes.


.. :changelog:

History
-------

0.1.2 (2013-07-07)
+++++++++++++++++++

- Removed rendering of build route args when route doesn't have args

0.1.1 (2013-07-06)
+++++++++++++++++++

- Added `jsroutes.reload_routes` settings

0.1.0 (2013-07-06)
+++++++++++++++++++

- Initial commit

Metadata

Release files for pyramid-jsroutes 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyramid-jsroutes 0.1.2
File Size Uploaded
pyramid-jsroutes-0.1.2.tar.gz 3.8 kB Details

Release files / pyramid-jsroutes-0.1.2.tar.gz

Download URL pyramid-jsroutes-0.1.2.tar.gz
Size 3.8 kB
Tags Source
SHA-256 checksum
How to use checksums
99a8ffcbfda41a7be7adcd59b89ebac355ac0c23108e3fe36bf015dee9cfad93
BLAKE2b-256 checksum
How to use checksums
8fefbdee2d5ce5e6fed049ba60d87598c2981e497361b8bcf82c5c4d81c69f14
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1.2 This release

1 release file

0.1.1

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page