Re: RestController implementing a db limit on GET results
That worked perfectly. Thanks! On Fri, Sep 25, 2009 at 8:24 PM, Mike Orr sluggos...@gmail.com wrote: On Fri, Sep 25, 2009 at 4:39 PM, Jon Collette skr...@gmail.com wrote: I'm using the RestController which generates a map.resources route: map.resource('message', 'message', controller='api/message', path_prefix='/api', name_prefix='api_') This works great for GET calls: /api/message OR /api/message/$message_id I would like to use the url: /api/message/$message_id/$offset I can't figure out how to retrieve another value from my route. map.resource creates very specific URLs. I don't think there's a way to add components on the right without reimplementing the method. You can add additional routes for them: map.resource(... same as above ...) map.connect(api_message_with_offset, /api/message/{id}/{offset}, controller=api/message, action=show) def show(self, id, offset=None, format=html) You can add additional GET routes with the method; e.g., /api/message/2/ask_delete , but that's only for a few fixed values, not for an arbitrary offset. -- Mike Orr sluggos...@gmail.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@googlegroups.com To unsubscribe from this group, send email to pylons-discuss+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
RestController implementing a db limit on GET results
I'm using the RestController which generates a map.resources route: map.resource('message', 'message', controller='api/message', path_prefix='/api', name_prefix='api_') This works great for GET calls: /api/message OR /api/message/$message_id I would like to use the url: /api/message/$message_id/$offset I can't figure out how to retrieve another value from my route. Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@googlegroups.com To unsubscribe from this group, send email to pylons-discuss+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---
Re: cron Paster Command
Anyone else have issues with that is.gd link? It redirected me back into gmail. It freaks me out a little. On Fri, Sep 18, 2009 at 1:52 PM, Raoul Snyman raoul.sny...@gmail.comwrote: Hi guys, I've recently been investigating how to run cron jobs for my Pylons applications, and followed the example I found on the wiki by creating a paster command. I've blogged about it, and uploaded the script to my blog. http://is.gd/3qpl6 One of the cool things about it (if I may brag a little!) is that you don't have to do much to get it up and running. The command class will find all your controllers, and will run a cron command if it exists in your controller. Constructive criticism is welcome! -- Raoul Snyman B.Tech Information Technology (Software Engineering) E-Mail: raoul.sny...@gmail.com Web: http://www.saturnlaboratories.co.za/ Blog: http://blog.saturnlaboratories.co.za/ Mobile: 082 550 3754 Registered Linux User #333298 (http://counter.li.org) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@googlegroups.com To unsubscribe from this group, send email to pylons-discuss+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~--~~~~--~~--~--~---