Routes

Latest version: v2.5.1

Safety actively analyzes 642295 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 8 of 8

1.0

=============================
* routes.__init__ will now load the common symbols most people will
want to actually use.
Thus, you can either::

from routes import *

Or::

from routes import request_config, Mapper

The following names are available for importing from routes::

request_config, Mapper, url_for, redirect_to

* Route Names - You can now name a route, which will save a copy of the defaults
defined for later use by url_for or redirect_to.
Thus, a route and url_for looking like this::

m.connect('home', controller='blog', action='splash')
url_for(controller='blog', action='splash') => /home

Can now be used with a name::

m.connect('home_url','home', controller='blog', action='splash')
url_for('home_url') => /home

Additional keywords can still be added to url_for and will override defaults in
the named route.
* Trailing / - Route recognition earlier failed on trailing slashes, not really a bug,
not really a feature I guess. Anyways, trailing slashes are o.k. now as in the Rails
version.
* redirect_to now has two sets of tests to ensure it works properly

Page 8 of 8

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.