pip install -U pyramid-jsroutes
Include the package in your Pyramid app's main function:
this will make `jsroutes` available to all your template context, then you can use it like:
JSROUTES.blog_post(1) // /posts/1
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
Each time your modify your Pyramid routes, you need to refresh your page to refetch the updated routes.
- Removed rendering of build route args when route doesn't have args
- Added `jsroutes.reload_routes` settings
- Initial commit
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.