this may be of interest:
http://stackoverflow.com/questions/5050481/restful-backend-framework-for-backbone-js-and-co
Patterns can be farily complex. Assuming
db.define_table('person',Field('name'))
db.define_table('pet',Field('owner',db.person),Field('name'),Field('info'))
you can do
patterns = [
'/person-by-id/{person.id}',
'/person-by-id/{person.id}/:field',
Because I would know how to do
@request.get()
def api(): return dict()
@request.post()
def api(): return dict()
i.e. have two functions with the same name and select one or the other
without ambiguity.
On Mar 13, 9:04 am, contatogilson...@gmail.com
contatogilson...@gmail.com wrote:
Would not
Or it may be well:
@request.get()
@request.post()
def api(): return dict()
As he is a decorator, avoid ambiguities and thus would be more clear the
code.
_
*Gilson Filho*
*Web Developer
http://gilsondev.com*
2011/3/13 Massimo Di Pierro
this is interesting...
I added the function in a app's default controller, the did this:
for x in [item.strip().split('/') for item in urllib2.urlopen('http://
127.0.0.1:8000/appRM/default/api/list.json')]:
for item in [string.strip(y,', ') for y in x[1:-1]]:
5 matches
Mail list logo