Did I find the right examples for you? yes no

All Samples(90)  |  Call(90)  |  Derive(0)  |  Import(0)
Generate routes for a controller resource

The member_name name should be the appropriate singular version
of the resource given your locale and used with members of the
collection. The collection_name name will be used to refer to
the resource collection methods and should be a plural version
of the member_name argument. By default, the member_name name
will also be assumed to map to a controller you create.

The concept of a web resource maps somewhat directly to 'CRUD' (more...)

src/b/l/blueberrypy-HEAD/examples/helloworld/helloworld/config.py   blueberrypy(Download)
 
    map.connect('/', controller='main')
    map.resource('foo', 'foo', controller='foo')
 
    return map

src/a/d/adhocracy-2.4.1/parts/omelette/adhocracy/config/routing.py   adhocracy(Download)
                controller='user', action='avatar')
 
    map.resource('user', 'user', member={'votes': 'GET',
                                         'delegations': 'GET',
                                         'instances': 'GET',
    #             action='update_badges', conditions=dict(method=['POST']))
 
    map.resource('proposal', 'proposal', member={'delegations': 'GET',
                                                 'activity': 'GET',
                                                 'ask_delete': 'GET',
                action='create_proposal', conditions=dict(method=['POST']))
 
    map.resource('implementation', 'implementation', controller='selection',
                 member={'ask_delete': 'GET'},
                 collection={'include': 'GET',
                conditions=dict(method=['GET']))
 
    map.resource('page', 'page', member={'ask_delete': 'GET'})
 
    # map.connect('/adopted', controller='proposal', action='adopted')
 
    map.resource('comment', 'comment', member={'history': 'GET',

src/a/d/adhocracy-2.4.1/src/adhocracy/config/routing.py   adhocracy(Download)
                controller='user', action='avatar')
 
    map.resource('user', 'user', member={'votes': 'GET',
                                         'delegations': 'GET',
                                         'instances': 'GET',
    #             action='update_badges', conditions=dict(method=['POST']))
 
    map.resource('proposal', 'proposal', member={'delegations': 'GET',
                                                 'activity': 'GET',
                                                 'ask_delete': 'GET',
                action='create_proposal', conditions=dict(method=['POST']))
 
    map.resource('implementation', 'implementation', controller='selection',
                 member={'ask_delete': 'GET'},
                 collection={'include': 'GET',
                conditions=dict(method=['GET']))
 
    map.resource('page', 'page', member={'ask_delete': 'GET'})
 
    # map.connect('/adopted', controller='proposal', action='adopted')
 
    map.resource('comment', 'comment', member={'history': 'GET',

src/a/d/adhocracy-2.4.1/installed_eggs/adhocracy/config/routing.py   adhocracy(Download)
                controller='user', action='avatar')
 
    map.resource('user', 'user', member={'votes': 'GET',
                                         'delegations': 'GET',
                                         'instances': 'GET',
    #             action='update_badges', conditions=dict(method=['POST']))
 
    map.resource('proposal', 'proposal', member={'delegations': 'GET',
                                                 'activity': 'GET',
                                                 'ask_delete': 'GET',
                action='create_proposal', conditions=dict(method=['POST']))
 
    map.resource('implementation', 'implementation', controller='selection',
                 member={'ask_delete': 'GET'},
                 collection={'include': 'GET',
                conditions=dict(method=['GET']))
 
    map.resource('page', 'page', member={'ask_delete': 'GET'})
 
    # map.connect('/adopted', controller='proposal', action='adopted')
 
    map.resource('comment', 'comment', member={'history': 'GET',

src/a/d/adhocracy-HEAD/src/adhocracy/config/routing.py   adhocracy(Download)
                controller='user', action='avatar')
 
    map.resource('user', 'user', member={'votes': 'GET',
                                         'delegations': 'GET',
                                         'instances': 'GET',
    #             action='update_badges', conditions=dict(method=['POST']))
 
    map.resource('proposal', 'proposal', member={'delegations': 'GET',
                                                 'activity': 'GET',
                                                 'ask_delete': 'GET',
                action='create_proposal', conditions=dict(method=['POST']))
 
    map.resource('implementation', 'implementation', controller='selection',
                 member={'ask_delete': 'GET'},
                 collection={'include': 'GET',
                conditions=dict(method=['GET']))
 
    map.resource('page', 'page', member={'ask_delete': 'GET'})
 
    # map.connect('/adopted', controller='proposal', action='adopted')
 
    map.resource('comment', 'comment', member={'history': 'GET',

src/n/e/neutron-HEAD/neutron/api/extensions.py   neutron(Download)
                    submap.connect("%s.:(format)" % path)
 
            mapper.resource(resource.collection, resource.collection,
                            controller=resource.controller,
                            member=resource.member_actions,

src/r/h/RhodeCode-2.2.5/rhodecode/config/routing.py   RhodeCode(Download)
 
    #ADMIN DEFAULTS REST ROUTES
    rmap.resource('default', 'defaults',
                  controller='admin/defaults', path_prefix=ADMIN_PREFIX)
 

src/f/o/formalchemy-HEAD/pylonsapp/pylonsapp/config/routing.py   formalchemy(Download)
    map.connect('formatted_admin', '/admin.json', controller='admin', action='models', format='json')
    # Models
    map.resource('model', 'models', path_prefix='/admin/{model_name}', controller='admin')
 
    # serve couchdb's Pets as resource
    # Index page
    map.connect('couchdb', '/couchdb', controller='couchdb', action='models')
    # Model resources
    map.resource('node', 'nodes', path_prefix='/couchdb/{model_name}', controller='couchdb')
 
    # serve Owner Model as resource
    map.resource('owner', 'owners')
 
    map.connect('/{controller}/{action}')

src/g/l/glance-buildpackage-HEAD/glance/registry/api/v1/__init__.py   glance-buildpackage(Download)
    def __init__(self, conf, **local_conf):
        mapper = routes.Mapper()
 
        images_resource = images.create_resource(conf)
        mapper.resource("image", "images", controller=images_resource,
                        collection={'detail': 'GET'})
        mapper.connect("/", controller=images_resource, action="index")
 
        members_resource = members.create_resource(conf)
        mapper.resource("member", "members", controller=members_resource,

src/g/l/glance-buildpackage-HEAD/glance/api/v1/router.py   glance-buildpackage(Download)
        images_resource = images.create_resource(conf)
 
        mapper.resource("image", "images", controller=images_resource,
                        collection={'detail': 'GET'})
        mapper.connect("/", controller=images_resource, action="index")
        members_resource = members.create_resource(conf)
 
        mapper.resource("member", "members", controller=members_resource,
                        parent_resource=dict(member_name='image',
                                             collection_name='images'))

  1 | 2 | 3 | 4 | 5  Next