[web2py] Re: MongoDB and Web2py

2011-10-12 Thread Tiago Moutinho
On Oct 12, 12:07 pm, David Marko wrote: > Massimo adviced me to use something like this previsously: > > def make_connection(): >      from pymongo import Connection >      connection = Connection('localhost', 27017) >      return connection > > connection = cache.ram('mongodb',make_connection,Non

[web2py] PowerTable editable callback

2011-05-06 Thread Tiago Moutinho
Hello, I'm using PowerTable and I love it! But I have an issue: I want to edit a column named status, but only that column. And i want to alter de value of that column (status) on the databse, with an update. I've made an editable function, but something is missing, i guess, because it does not w

[web2py] PowerTable editable callback

2011-05-06 Thread Tiago Moutinho
Hello, I'm using PowerTable and I love it! But I have an issue: I want to edit a column named status, but only that column. And i want to alter de value of that column (status) on the databse, with an update. I've made an editable function, but something is missing, i guess, because it does not w

Re: [web2py] PowerTable editable callback

2011-05-09 Thread Tiago Moutinho
Hi Bruno, Is there any possibility to edit only one column? cumps, Tiago

[web2py] Help about the restful api

2011-05-18 Thread Tiago Moutinho
Hi, I have some difficulties on using @resquest.restful(). I want to do some experiments using GET, POST, PUSH and DELETE, but i can not make it work. Only GET works for me. How can i do for example a def POST(name): ?? I did this: def POST(name): return db.blog.validate_and_insert(name =

[web2py] Re: Help about the restful api

2011-05-18 Thread Tiago Moutinho
x27;http://localhost/post/post_test', urllib.urlencode(params)) return http_response Does anyone have some ideas in makinh PUSH AND DELETE work??? On May 18, 10:31 am, Tiago Moutinho wrote: > Hi, > > I have some difficulties on using @resquest.restful(). > I want to do

[web2py] HELP IN DELETE AND PUSH METHODS USING RESTFUL API

2011-05-18 Thread Tiago Moutinho
Hi, I need some help about the delete and push methods using restful api. I made POST method work using urllib2, but i can not find anything on the web about DELETE AND PUSH Please help Thks in advance

[web2py] App blog as subdomain of another app

2011-05-18 Thread Tiago Moutinho
Hello, How can I change this http://www.test.com/blog to this blog.test.com ?? I know that ia have to change in routes.py but i do not know how. i tried this in routes.py: (r'.*blog.test.com*', r'http://www.test.com/blog'), but it still does not work. Many thaks in advance.

[web2py] Re: HELP IN DELETE AND PUSH METHODS USING RESTFUL API

2011-05-18 Thread Tiago Moutinho
I created this controller named api, as seen in you video. @request.restful() def place(): def GET(id): place = db.place(id) return place.as_dict() if place else None def POST(name, description): return db.place.validate_and_insert(name = name, description = descri

[web2py] Re: Help about the restful api

2011-05-18 Thread Tiago Moutinho
Hi, i answer it the other post. But my problem is in the client.

[web2py] Re: Help about the restful api

2011-05-19 Thread Tiago Moutinho
I created this controller named api, as seen in you video. @request.restful() def place(): def GET(id): place = db.place(id) return place.as_dict() if place else None def POST(name, description): return db.place.validate_and_insert( name = name, description = descri

[web2py] Duvida restful()

2011-05-23 Thread Tiago Moutinho
Hi, I have in my databse 2 tables: blog_post(id, name, slug, description) and blog_comments(id, post_id, comment). I want to use the restful api to for example list all comments for a given slug from blog_post. It is possible? With patterns i can not do that. Other question: Can i do a patter

[web2py] restful api

2011-05-23 Thread Tiago Moutinho
Hi, I have in my databse 2 tables: blog_post(id, name, slug, description) and blog_comments(id, post_id, comment). I want to use the restful api to for example list all comments for a given slug from blog_post. It is possible? With patterns i can not do that. Other question: Can i do a patter

[web2py] Re: Using the REST API with Auth.

2011-06-02 Thread Tiago Moutinho
i think this might help you out: http://comments.gmane.org/gmane.comp.python.web2py/39225

[web2py] Re: default function of a controller

2011-06-14 Thread Tiago Moutinho
I also want to know that.. its in the routes?? On Jun 14, 11:55 am, Francisco Costa wrote: > Hello, > > I have this controller (not the default one) that I would like to have > a default function (not index) > > How can I do that?

[web2py] Re: Tiny example on uwsgidecorators+web2py

2011-07-21 Thread Tiago Moutinho
Hello Roberto, I've tried to start web2py has you demonstrated: uwsgi --socket :3031 --spooler myspool --master --processes 4 -- import mytasks --module web2py.wsgihandler but I got this error: [spooler directory] access(): No such file or directory [uwsgi.c line 2994] What is wrong?

[web2py] Re: Tiny example on uwsgidecorators+web2py

2011-07-21 Thread Tiago Moutinho
How can i create the spoller directory? thks in advance On Jul 21, 6:06 pm, "Roberto De Ioris" wrote: > > Hello Roberto, > > > I've tried to start web2py has you demonstrated: > > >      uwsgi --socket :3031 --spooler myspool --master --processes 4 -- > > import mytasks --module web2py.wsgihandl

[web2py] Re: Tiny example on uwsgidecorators+web2py

2011-07-22 Thread Tiago Moutinho
thks Roberto, tiago@tiago:~$ cd /opt/web2py/ tiago@tiago:/opt/web2py$ mkdir myspool tiago@tiago:/opt/web2py$ uwsgi --socket :3031 --spooler myspool -- master --processes 4 --import mytasks --module web2py.wsgihandler uwsgi: unrecognized option '--import' On Jul 22, 5:47 am, "Roberto De Ioris" w

[web2py] Re: Tiny example on uwsgidecorators+web2py

2011-07-22 Thread Tiago Moutinho
I using 0.9.8.1. How can i update to 0.9.8.2 thks in advance On Jul 22, 10:15 am, Roberto De Ioris wrote: > Il giorno 22/lug/2011, alle ore 11:09, Tiago Moutinho ha scritto: > > > thks Roberto, > > > tiago@tiago:~$ cd /opt/web2py/ > > tiago@tiago:/opt/web2py$ mkdir m

[web2py] Re: Tiny example on uwsgidecorators+web2py

2011-07-22 Thread Tiago Moutinho
an move the discussion to > the uWSGI list (or the irc channel) and come back here when you have a > working setup :) > > > > > > > > > > > > > On Jul 22, 10:15 am, Roberto De Ioris wrote: > >> Il giorno 22/lug/2011, alle ore 11:09, Tiago Mouti

[web2py] Re: Tiny example on uwsgidecorators+web2py

2011-07-22 Thread Tiago Moutinho
How can i enable the spooler? I have pass target='spooler' to the decorator args but it gives the same error. On Jul 22, 7:44 pm, Tiago Moutinho wrote: > I'M sorry Roberto for this boring question, but it gives an error in > web2py when i try to run the controller, and i d