Did I find the right examples for you? yes no

All Samples(18)  |  Call(18)  |  Derive(0)  |  Import(0)
Add a redirect route to the mapper

Redirect routes bypass the wrapped WSGI application and instead
result in a redirect being issued by the RoutesMiddleware. As
such, this method is only meaningful when using
RoutesMiddleware.

By default, a 302 Found status code is used, this can be
changed by providing a ``_redirect_code`` keyword argument
which will then be used instead. Note that the entire status(more...)

src/o/p/openspending-HEAD/openspending/ui/config/routing.py   openspending(Download)
                controller='dimension', action='entries')
 
    map.redirect('/*(url)/', '/{url}', _redirect_code='301 Moved Permanently')
    return map
 

src/w/d/wdmmg-0.8/wdmmg/config/routing.py   wdmmg(Download)
    map.connect('/api/rest/enumeration_value/{id_}', controller='rest', action='enumeration_value_id')
 
    map.redirect('/*(url)/', '/{url}', 
        _redirect_code='301 Moved Permanently') 
    return map

src/d/o/dodgr-HEAD/servers/pylons/DODGR/dodgr/config/routing.py   dodgr(Download)
    # Redirect the trailing-slash version to no slash, which should be the
    # canonical URL
    map.redirect('/*(url)/', '/{url}',
                 _redirect_code='301 Moved Permanently')
 

src/b/l/blog.v1-HEAD/wurdig/config/routing.py   blog.v1(Download)
                action='view', 
                requirements = {'slug' : '[-\w]+'})
    map.redirect('/{slug}/', '/{slug}', _redirect_code='301 Moved Permanently')    
 
    map.connect('/{controller}/{action}')

src/l/o/logsandra-0.1dev/logsandra/config/routing.py   logsandra(Download)
    map.connect('/{controller}/{action}/{id}')
 
    map.redirect('/*(url)/', '/{url}', _redirect_code='301 Moved Permanently')
 
    return map

src/l/o/logsandra-HEAD/logsandra/config/routing.py   logsandra(Download)
    map.connect('/{controller}/{action}/{id}')
 
    map.redirect('/*(url)/', '/{url}', _redirect_code='301 Moved Permanently')
 
    return map

src/i/d/ideabox-HEAD/ideabox/config/routing.py   ideabox(Download)
    map.connect('/{controller}/{action}/{id}')
 
    map.redirect('/*(url)/', '/{url}', _redirect_code='301 Moved Permanently')
 
 

src/g/e/georegistry-HEAD/georegistry/config/routing.py   georegistry(Download)
    map.explicit = False
    # Remove trailing slash
    map.redirect('/{controller}/', '/{controller}')
    # Map errors
    map.connect('/errors/{action}', controller='errors')
    map.connect('map_view_', '/maps.{responseFormat}', controller='maps', action='view')
    # Map examples
    map.redirect('/examples', '/docs')
    map.connect('/examples/polymaps', controller='examples', action='polymaps')
    map.connect('/examples/openlayers', controller='examples', action='openlayers')
    # Redirect index
    map.redirect('/', '/docs')

src/n/e/networkplanner-HEAD/np/config/routing.py   networkplanner(Download)
    map.explicit = False
    # Remove trailing slash
    map.redirect('/{controller}/', '/{controller}')
    # Map errors
    map.connect('/errors/{action}', controller='errors')

src/a/d/Adjector-1.0b2/adjector/config/routing.py   Adjector(Download)
 
    # CUSTOM ROUTES HERE
    map.redirect(base, base + '/')
    map.connect(base + '/', controller='main', action='index')
 

  1 | 2  Next