[web2py] Legacy DB using uuid value for "id" column

2021-11-10 Thread Tito Garrido
Hi! I am trying to connect pydal to external database with fake_migration false just to use the pydal interface to interact with this database. But when I try to select something like: db(db.profiles.id == current_user.user_id).select(db .profiles.can_vote).first() It complains about "profiles.i

[web2py] Error 400 for Not authorized? Shouldn't we use 401?

2019-12-19 Thread Tito Garrido
Hi Guys, I am using AuthJWT from https://github.com/web2py/web2py/blob/master/gluon/tools.py I could see that an expired token or not authorized token is returning error 400. Shouldn't we use 401 - Unauthorized? https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/401 Thanks! Tito -- Li

[web2py] Is there any documentation about DBAPI and JWT?

2019-12-17 Thread Tito Garrido
Hi Guys, Is there any documentation about DBAPI and JWT working together? I am trying to create a protected API that will be access by vue. Thanks! Tito -- Linux User #387870 . _/_õ|__| ..º[ .-.___.-._| . . . . .__( o)__( o).:___ -- Resources: - http://web2py.com - htt

Re: [web2py] Re: web3py -> py4web

2019-07-29 Thread Tito Garrido
I am trying to reproduce the RestAPI example: *>>> print (pydal.__version__)19.05.11>>> from pydal.dbapi import RestAPI, Policy* Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named 'pydal.dbapi' What am I missing? On Mon, Jul 29, 2019 at 10:43 AM Ant

Re: [web2py] Re: validate_insert, status 200 and data="iderrors"

2019-07-18 Thread Tito Garrido
; > On Wednesday, July 17, 2019 at 3:40:07 PM UTC-7, Dave S wrote: >> >> >> On Wednesday, July 17, 2019 at 11:02:59 AM UTC-7, Tito Garrido wrote: >>> >>> No entry in the database... >>> >>> I could execute the post from postman... but if I tr

Re: [web2py] Re: validate_insert, status 200 and data="iderrors"

2019-07-17 Thread Tito Garrido
> TypeError: 'NoneType' object is not callable No idea what it means... On Wed, Jul 17, 2019 at 2:23 PM Dave S wrote: > > > On Wednesday, July 17, 2019 at 7:36:40 AM UTC-7, Tito Garrido wrote: >> >> Hi! >> >> I am trying to call a POST method fr

[web2py] validate_insert, status 200 and data="iderrors"

2019-07-17 Thread Tito Garrido
Hi! I am trying to call a POST method from a Vue.js frontend. My backend is web2py serving a REST API: @request.restful() > @cors_allow > def save_transaction(): > response.view = 'generic.json' > > def POST(**data): > # Creating the parent transaction > > parent = {'paren

Re: [web2py] Re: authapi.py

2019-05-15 Thread Tito Garrido
? Thank you! Tito On Tue, May 14, 2019 at 3:15 PM Tito Garrido wrote: > Thank you, > > https://github.com/robertop23/web2py_vuejs_vuetify/blob/master/controllers/api.py > > works for me! > > On Mon, May 13, 2019 at 4:23 PM Val K wrote: > >> https:/

Re: [web2py] Re: authapi.py

2019-05-14 Thread Tito Garrido
t; https://github.com/robertop23/web2py_vuejs_vuetify/blob/master/controllers/api.py > > On Monday, May 13, 2019 at 10:11:31 PM UTC+3, Tito Garrido wrote: >> >> Hi Guys! >> >> Is there any example using authapi + jwt in any documentation? >> >> Thank you! >> &g

[web2py] authapi.py

2019-05-13 Thread Tito Garrido
Hi Guys! Is there any example using authapi + jwt in any documentation? Thank you! Tito -- Linux User #387870 . _/_õ|__| ..º[ .-.___.-._| . . . . .__( o)__( o).:___ -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web

[web2py] Anybody using Istio on kubernetes + web2py?

2019-01-22 Thread Tito Garrido
Hi Folks! Anybody using a dockerized application in kubernetes with Istio enabled? Any experience to share? Thanks in advance! Tito -- Linux User #387870 . _/_õ|__| ..º[ .-.___.-._| . . . . .__( o)__( o).:___ -- Resources: - http://web2py.com - http://web2py.com/book (D

Re: [web2py] New site on web2py

2017-06-19 Thread Tito Garrido
Cool! Seems that the autocomplete after the first "Next" is crashing on Firefox, example: https://www.wherecani.live/data_wizard?born=Brazil Using Chrome it works. Regards, Tito On Mon, Jun 19, 2017 at 8:44 AM, Ovidio Marinho wrote: > Congratulations, very good! > > > > > >

Re: [web2py] Re: How to recreate Scheduler tables?

2016-08-22 Thread Tito Garrido
Thanks! On Mon, Aug 22, 2016 at 10:36 AM, Niphlod wrote: > mysched = Scheduler(., migrate=True) > > > On Monday, August 22, 2016 at 3:17:24 PM UTC+2, Tito Garrido wrote: >> >> I have upgraded from 2.5.1 to the latest version but seems that the >> schedule

[web2py] How to recreate Scheduler tables?

2016-08-22 Thread Tito Garrido
I have upgraded from 2.5.1 to the latest version but seems that the scheduler tables had changed... I have dropped the old ones and now I am trying to set web2py to recreate it. If I try to enable migrate it complains about some tables that already exists... how to circunvent the tables that are a

[web2py] Upgrade from 2.5.1 to latest

2016-08-02 Thread Tito Garrido
Hi Folks, I am trying to upgrade my web2py from 2.5.1 to latest and the appadmin text editor breaks... I have tried to get appadmin.html, layout.hmt and some js files from the Welcome app but it still complains: TypeError: editor is undefined var data = editor.getValue(); What is the best way

Re: [web2py] how to return nothing

2015-10-14 Thread Tito Garrido
try: return dict() On Wed, Oct 14, 2015 at 6:43 PM, Alex Glaros wrote: > how to get function to return nothing? > > Goal is simply to avoid pages of records on html page as function runs > > def utility_change_column_name(): #used once in a while by programmer. > Not used by users. > for r in

Re: [web2py] PyCharm license for web2py dev - who wants?

2015-10-12 Thread Tito Garrido
+1 :) On Mon, Oct 12, 2015 at 8:32 AM, António Ramos wrote: > Picharm eats more memory than sublime. > > In sublime i have everything, w2py console and server logs so > > 2015-10-12 11:01 GMT+01:00 Paolo Amboni : > >> I'm using pycharm community edition, that for what I understand is free. >

[web2py] Re: web2py + celery + pydal

2015-02-13 Thread Tito Garrido
I just found "auto_import" that is great! db = DAL('mysql://user:pass@localhost /datab',folder='path_to/applications/myapp/databases',auto_import=True) Works great! On Fri, Feb 13, 2015 at 3:24 PM, Tito Garrido wrote: > Hi Folks! > > I am working on

[web2py] web2py + celery + pydal

2015-02-13 Thread Tito Garrido
Hi Folks! I am working on a project that will require some celery tasks and I would like to use pydal to manage the tables created on web2py. So an example, a simple tw clone... that would use auth_user table + references db.define_table('tweet', Field('user_id', 'reference auth_user'),

Re: [web2py] Re: web3py status

2015-01-19 Thread Tito Garrido
I wouldn't change the name at all... Because it is not related to python version lets just stay with web2py :) On Mon, Jan 19, 2015 at 1:03 AM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > py4web? > > > On Sunday, 18 January 2015 15:22:10 UTC-6, Michele Comitini wrote: >> >> the 3 in

[web2py] Websocket doesn't work on stable version

2015-01-04 Thread Tito Garrido
Hi Folks, I am using 2.9.11 and when I try to use $.web2py.web2py_websocket('ws:// 127.0.0.1:/realtime/mygroup', function(e){alert(e.data)}) I receive error 403 Forbidden from the server. Chrome: WebSocket connection to 'ws://127.0.0.1:/realtime/mygroup' failed: Error during WebSocket han

Re: [web2py] Re: How can I from a celery task post a message in websocket_messaging.py?

2015-01-04 Thread Tito Garrido
', 'mygroup') > > > On Saturday, January 3, 2015 9:27:17 PM UTC+1, Tito Garrido wrote: >> >> Hey Folks, >> >> I am studying websockets and I am wondering how could I post a message >> from a script that is running outside of web2py, like a celery

[web2py] How can I from a celery task post a message in websocket_messaging.py?

2015-01-03 Thread Tito Garrido
Hey Folks, I am studying websockets and I am wondering how could I post a message from a script that is running outside of web2py, like a celery task. Anybody has an small example? Thanks in advance! Tito -- Linux User #387870 . _/_õ|__| ..º[ .-.___.-._| . . . . .__( o)__( o)

Re: [web2py] This looks like it needs some web2py love...

2015-01-02 Thread Tito Garrido
+1 On Sat, Dec 7, 2013 at 1:32 PM, Jason (spot) Brower wrote: > https://github.com/github/gitignore > > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documentation) > - http://github.com/web2py/web2py (Source code) > - https://code.google.com/p/web2py/issues/list (Report Issu

[web2py] Re: Validator for Unix path

2014-12-31 Thread Tito Garrido
ot;Invalid Path")else:return (value, None) except:return (value, self.error_message)* On Wed, Dec 31, 2014 at 6:45 PM, Tito Garrido wrote: > Hi Folks! > > Anybody has built a custom validator for unix paths? I need to validate if > a pat

[web2py] Validator for Unix path

2014-12-31 Thread Tito Garrido
Hi Folks! Anybody has built a custom validator for unix paths? I need to validate if a path is valid even if the directory/file doesn't exist. Thanks! Tito -- Linux User #387870 . _/_õ|__| ..º[ .-.___.-._| . . . . .__( o)__( o).:___ -- Resources: - http://web2py.com - h

Re: [web2py] Re: happy holidays everybody

2014-12-24 Thread Tito Garrido
*Happy holidays! Awesome gift!* On Wed, Dec 24, 2014 at 2:39 PM, Leonel Câmara wrote: > Happy holidays everyone! > > Great job on the DAL! > > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documentation) > - http://github.com/web2py/web2py (Source code) > - https://code.goog

Re: [web2py] Re: docker

2014-12-24 Thread Tito Garrido
HI Massimo, It is working on a virtual machine using Ubuntu.. this is the steps that I have followed: I have built the image and tagged as web2py1 using: sudo docker build -t web2py1 . So an image has been generated called "web2py1". To run in on an exposed port I have ran: docker run -i -P -

[web2py] Current logged in users

2014-09-17 Thread Tito Garrido
Hi Folks, Is there a way to list the current logged in users? Regards, Tito -- Linux User #387870 . _/_õ|__| ..º[ .-.___.-._| . . . . .__( o)__( o).:___ -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source

Re: [web2py] Re: Dynamic Subdomains

2014-06-10 Thread Tito Garrido
Hi Massimo, Would you recommend to setup anything on routes.py? I have the same question of Carlos... In my application all users will select a username and a subdomain will be available user1.example.com user2.example.com Every time that they use this URL it would go to a specific controller fun

Re: [web2py] Re: Here's how to run Web2Py on IBM BlueMix

2014-05-09 Thread Tito Garrido
Hi Duncan, It is my first time deploying web2py on a PaSS could you please let me know how to proceed on step 1? Step 1: Use the source version of Web2Py and copy the entire lot into a folder path: 'env/app' so that web2py.py is in the 'app' folder. Step 2: You need to have a requirements.txt f

[web2py] Anybody has an example of inner join + sum?

2014-04-04 Thread Tito Garrido
Hi, I am trying to sum a query that is a result of an inner join, the inner join returns as expected but I am not able to sum, when I put my sum inside of the select() it returns None. Do I need to change anything in my sum variable? I am trying: sum=db.table2.value.sum() query=db((db.table1.fie

[web2py] Re: Anybody has an example of inner join + sum?

2014-04-04 Thread Tito Garrido
Nevermind I was not using the .first()[sum] at the end :) On Fri, Apr 4, 2014 at 3:01 PM, Tito Garrido wrote: > Hi, > > I am trying to sum a query that is a result of an inner join, the inner > join returns as expected but I am not able to sum, when I put my sum inside > of

Re: [web2py] Re: Is there a way to set the class in auth.register() form?

2014-02-18 Thread Tito Garrido
thanks! On Tue, Feb 18, 2014 at 4:20 PM, Anthony wrote: > def user: > form = auth() > if request.args(0) == 'register': > form['_class'] = 'myclass' > return dict(form=form) > > Anthony > > On Tuesday, February 18, 2

[web2py] Is there a way to set the class in auth.register() form?

2014-02-18 Thread Tito Garrido
Hi Folks, I am trying to customize my registration form. Is there a way to set the class of the generated form of auth.register()? Thanks! Tito -- Linux User #387870 . _/_õ|__| ..º[ .-.___.-._| . . . . .__( o)__( o).:___ -- Resources: - http://web2py.com - http://web2py

Re: [web2py] Re: Social Login - Twitter logs out plus some other issues- web2py 2.8.2 / Mac OS X 10.9.1

2014-02-17 Thread Tito Garrido
Hi Luciano, Did you find a way to use auth.settings.login_form in the controllers? I am facing the same issue. Regards, Tito On Mon, Dec 23, 2013 at 2:06 PM, Luciano Laporta Podazza < lucianopoda...@gmail.com> wrote: > Thanks for the advice Leonel!, > > You're totally right, I should change t

Re: [web2py] Re: Free opensource Janrain alternative - Python Social auth

2014-02-17 Thread Tito Garrido
Do we have any update about this integration? Thanks! Tito On Wed, Jul 31, 2013 at 4:27 PM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > Thank you. Will look at it asap. > > > On Wednesday, 31 July 2013 09:45:39 UTC-5, Quint wrote: >> >> I made an attempt to do this myself but i ne

Re: [web2py] Re: Is there a way to use parameters on --run (-R) ?

2014-02-16 Thread Tito Garrido
Thanks!!! On Sat, Feb 15, 2014 at 1:10 AM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > python web2py.py -S welcome -M -R tito.py -A param1 param2 > > > On Friday, 14 February 2014 16:35:15 UTC-6, Tito Garrido wrote: >> >> Hi Folks, >> >>

[web2py] Is there a way to use parameters on --run (-R) ?

2014-02-14 Thread Tito Garrido
Hi Folks, Just a simple test... an external script: $: cat tito.py import sys print sys.argv Then running with web2py: $ python web2py.py -S welcome -M -R tito.py param1 param2 web2py Web Framework Created by Massimo Di Pierro, Copyright 2007-2014 Version 2.8.2-stable+timestamp.2013.11.28.13.54.0

Re: [web2py] Re: Caching selects or use memcache, is it the same?

2014-01-28 Thread Tito Garrido
ons embedded in the > framework. > > > On Monday, January 27, 2014 3:50:36 PM UTC+1, Tito Garrido wrote: >> >> Hi Folks, >> >> I am planning a new application and I am wondering, should I use memcache >> instead of cache selects? >> >> Do I need to use

[web2py] Caching selects or use memcache, is it the same?

2014-01-27 Thread Tito Garrido
Hi Folks, I am planning a new application and I am wondering, should I use memcache instead of cache selects? Do I need to use memcache if I am using cache select? Which one is faster? What is the best practice? The plan is to cache some selects to show in view and get a fast response time. Tha

[web2py] Using find on cached queries

2013-12-04 Thread Tito Garrido
Hi Folks, I have report function that is caching my query, example: def report(): sites=db(db.site.ativo==True).select(db.site.id ,db.site.nome,cache=(cache.ram,6000),cacheable=True) lojas=db(db.estoque.ativo==True).select(db.estoque.id ,db.estoque.nome,cache=(cache.ram,6000),cacheable=Tru

Re: [web2py] Web2Py Pages module (basic CMS)

2013-11-19 Thread Tito Garrido
How to install it? I have tried to clone it on my applications directory but I am having trouble. On Tue, Nov 19, 2013 at 9:44 AM, Michele Comitini < michele.comit...@gmail.com> wrote: > +1! > > Will you make a demo on pythonanywhere.com/try-web2py or GAE, for the > lazy ones of us, that would l

[web2py] Suggestion for admin Views section

2013-11-12 Thread Tito Garrido
Hi Folks, It is just a suggestion, why the views files doesn't collapse like the files in static section? I think that folders should collapse so we could easily view just the files from that folder. I am suggesting because I have a big application using a lot of views separated by folders and th

[web2py] Too many tables selected

2013-11-10 Thread Tito Garrido
Hi Folks, I am trying to execute a simple test in mongodb (it worked on SQLite): Model: db.define_table('mytable', Field('name','string'), Field('age', 'integer'), Field('description', 'text')) db.define_table('another_table', Field('mytable', 'reference mytable'), Field('name

Re: [web2py] Re: Loading message using web2py_ajax_page

2013-10-31 Thread Tito Garrido
lod wrote: > use the "content" attribute of the LOAD helper for that > > > http://web2py.com/books/default/chapter/29/12/components-and-plugins#Components > > > On Thursday, October 31, 2013 3:15:24 PM UTC+1, Tito Garrido wrote: >> >> Hi Folks, &

[web2py] Loading message using web2py_ajax_page

2013-10-31 Thread Tito Garrido
Hi Folks, Is there a way to render a loading message while web2py_ajax_page is redering the component? Thanks, Tito -- Linux User #387870 . _/_õ|__| ..º[ .-.___.-._| . . . . .__( o)__( o).:___ -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

Re: [web2py] Re: How to serve multiple domains and multiple applications on nginx using pattern-based route

2013-10-07 Thread Tito Garrido
This route didn't work for me... routes_in = (( (('.*http://demo.ivinh.com.* /*', '/demo')), (('.*http://demo1.ivinh.com.* /*', '/demo1')) )) Not sure it is because I am using uwsgi... it keeps going to the default website... On Sat, Oct 5, 20

Re: [web2py] Re: How to serve multiple domains and multiple applications on nginx using pattern-based route

2013-10-05 Thread Tito Garrido
(( > (('.*http://demo.ivinh.com.* /*', '/demo')), > (('.*http://demo1.ivinh.com.* /*', '/demo1')) > )) > > > > > > Vào 06:43:07 UTC+7 Thứ bảy, ngày 05 tháng mười năm 2013, Tito Garrido đã > viết: > >> Hi Folks, >> &g

[web2py] How to serve multiple domains and multiple applications on nginx using pattern-based route

2013-10-04 Thread Tito Garrido
Hi Folks, I am using the default setup from the book for nginx: scripts/setup-web2py-nginx-uwsgi-ubuntu.sh And my routes are using *pattern-based* system. The question is, how can I route www.domain1.com to app1 and www.domain2.comto app2? nginx config in sites-enabled: *server { list

Re: [web2py] Re: need help to improve download of dynamic images (nginx)

2013-09-25 Thread Tito Garrido
/YOURAPP/uploads; } Cool! Thanks! Tito On Wed, Sep 25, 2013 at 7:15 PM, Niphlod wrote: > did you enable it in nginx with the configurations explained in their wiki > ? > > > On Wednesday, September 25, 2013 5:53:05 PM UTC+2, Tito Garrido wrote: > >> Hi Niphlod

Re: [web2py] Re: need help to improve download of dynamic images (nginx)

2013-09-25 Thread Tito Garrido
Hi Niphlod! I am using nginx as server and when I tried to use: response.headers['X-Accel-Redirect'] = os.path.join(request.folder, 'uploads', document.file) return '' mine is: *... path = splits[0] + '.' + splits[1] + '/' + splits[2][:2] + '/' global_path = path + image filename = os.path.join(

Re: [web2py] Re: Nice change to admin interface for editing files, what about static files?

2013-08-08 Thread Tito Garrido
Is there a way to collapse this left menu or just remove it? It is now worse to see the code, we lost a lot of edit area for a menu, I personally didn't like it. Changes on the interface should be optional, it changes the way that you use the admin... On Tue, Aug 6, 2013 at 9:08 AM, Rob_McC wrot

[web2py] LOAD inside a form

2013-08-08 Thread Tito Garrido
Hi Folks, I am using a LOAD function to put a ajax form inside of a form. This is to add videos to a content without need to reload the page... It works perfectly on firefox but on chrome, IE or Safari none of the forms works... It seems to ignore the ajax, reloads the pages and no validation is

[web2py] Fields.Virtual says that the column does not exist in 2.5.1 during record edit

2013-06-26 Thread Tito Garrido
Hi Folks, After update to 2.5.1 I got this message when I try to update a form with SQLFORM: 'Row' object has no attribute 'bom' db.define_table('video', Field('titulo', requires=IS_NOT_EMPTY(), unique=True), Field('tag', 'list:reference tag'), Field('slug', requires=[IS_NOT_EMPTY(),

Re: [web2py] Re: Is there a way to hide a directory from appadmin?

2013-06-06 Thread Tito Garrido
; On Thursday, 6 June 2013 09:51:44 UTC-5, Tito Garrido wrote: >> >> Hey Folks, >> >> My System has been creating some static files on /myapp/static/afolder/ >> >> There is more than 1000 directories inside of this folder that is >> preventing app admin from l

[web2py] Is there a way to hide a directory from appadmin?

2013-06-06 Thread Tito Garrido
Hey Folks, My System has been creating some static files on /myapp/static/afolder/ There is more than 1000 directories inside of this folder that is preventing app admin from loading... is there a way to ask appadmin to do not scan this folder? Regards, Tito -- Linux User #387870 .__

[web2py] How to add class to the TABLE in SQLFORM.grid

2013-05-08 Thread Tito Garrido
Hi Folks, I could see that all style related variables of SQLFORM.grid applies to the outside div. How can I style the table element of the SQLFORM.grid? THanks! Tito -- Linux User #387870 . _/_õ|__| ..º[ .-.___.-._| . . . . .__( o)__( o).:___ -- --- You received this

Re: [web2py] Re: How can I run multiple applications with multiple domains on nginx?

2013-05-08 Thread Tito Garrido
', r'/app1/static/$anything'), > (r'.*://www.site1.com:\w* /$anything', r'/app1/default/$anything'),) > routes_out = (('/app1/default/(?P.*)', '/\g'),) > > > and similarly for app2 > > I hope this helps > > Peter

[web2py] How to add class to a checkbox?

2013-04-24 Thread Tito Garrido
Hi Folks, I was reading: http://web2py.com/books/default/chapter/29/07?search=checkboxes#Widgets I am trying to implement some checkboxes with a specific class using DIVs: db.anuncio.equipamento.widget=lambda field,value: SQLFORM.widgets.checkboxes.widget(field,value,_class="span2",style='divs')

Re: [web2py] Re: IS_IN_DB(...,multiple=True) allowing empty values?

2013-04-23 Thread Tito Garrido
Thanks! On Tue, Apr 23, 2013 at 1:35 PM, Anthony wrote: > IS_IN_DB(..., multiple=(1, 1000)) > > The multiple argument can be a list/tuple specifying the minimum and > maximum number of items that can be selected. > > Anthony > > > On Tuesday, April 23, 2013 11:2

[web2py] IS_IN_DB(...,multiple=True) allowing empty values?

2013-04-23 Thread Tito Garrido
Hi Folks, I am implementing a list:reference table but it should not allow empty values. How can I do that? I have tried using a list [ ] but I lost my multiselect box, I don't want that, and then I have tried to use _and= but I got Doesn't allow an empty value shouldn't be default in IS_IN_DB?

Re: [web2py] Re: How to use custom forms + SQLFORM.grid?

2013-04-23 Thread Tito Garrido
oes form_grid.html look like? > > -Jim > > On Tuesday, April 23, 2013 9:31:07 AM UTC-5, Tito Garrido wrote: > >> Hi Folks! >> >> I am trying to use a custom form layout when I click on "Add" in a >> SQLFORM.grid... >> >> I could customize it but

[web2py] How to use custom forms + SQLFORM.grid?

2013-04-23 Thread Tito Garrido
Hi Folks! I am trying to use a custom form layout when I click on "Add" in a SQLFORM.grid... I could customize it but when I try to create a record nothing happens... What am I doing wrong? def mygrid(): form=None grid=SQLFORM.grid(db.mytable,csv=False,deletable=False,details=False,user_si

Re: [web2py] THUMB function in contrib - bug

2013-04-21 Thread Tito Garrido
I have fixed it adding '/uploads/', this way also works, but it needs to be fixed in contrib, I guess Massimo can do that. Regards, Tito On Sun, Apr 21, 2013 at 6:45 PM, Ricardo Pedroso wrote: > On Sun, Apr 21, 2013 at 10:35 PM, Tito Garrido > wrote: > > Hi Folks, >

[web2py] THUMB function in contrib - bug

2013-04-21 Thread Tito Garrido
Hi Folks, I was trying to use THUMB function following Bruno's tutorial for python RQ and I got: File "/root/web2py/gluon/contrib/imageutils.py", line 54, in THUMB img = Image.open(request.folder + 'uploads/' + image) File "/usr/lib/python2.7/dist-packages/PIL/Image.py", line 1952, in ope

[web2py] Export not working on filtered table?

2013-04-15 Thread Tito Garrido
Hi Folks, When I use the search field to filter the results and click on csv to export the result I get a 0 byte file... is it happening there? 2.4.6-stable+timestamp.2013.04.06.17.37.38 (Running on Rocket 1.2.6) -- Linux User #387870 . _/_õ|__| ..º[ .-.___.-._| . . . . .__( o

Re: [web2py] Re: Python Redis Queue

2013-04-15 Thread Tito Garrido
Nice! Is it working? Is there an example of application? Thanks! Tito On Mon, Dec 31, 2012 at 3:21 AM, Alec Taylor wrote: > On Mon, Dec 31, 2012 at 11:37 AM, Bruno Rocha > wrote: > > DONE!!! > > > > 1. create a file called web2py-rq.py > > > > #!/usr/bin/env python > > import sys > > from r

[web2py] web2py.com down for me...

2013-04-13 Thread Tito Garrido
-- Linux User #387870 . _/_õ|__| ..º[ .-.___.-._| . . . . .__( o)__( o).:___ -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+

Re: [web2py] Re: How to create a "doesn't belong" query, is it possible?

2013-04-12 Thread Tito Garrido
; > Anthony > > On Friday, April 12, 2013 9:51:38 AM UTC-4, Tito Garrido wrote: > >> It works here... at least for a SQLFORM.grid >> >> >> On Thu, Apr 11, 2013 at 10:26 PM, Alan Etkin wrote: >> >>> Is that the correct syntax? >>> >>&

Re: [web2py] Re: How to create a "doesn't belong" query, is it possible?

2013-04-12 Thread Tito Garrido
It works here... at least for a SQLFORM.grid On Thu, Apr 11, 2013 at 10:26 PM, Alan Etkin wrote: > Is that the correct syntax? > > select() returns a Rows object, and I'm not sure that operation is > supported, I tried it in a shell and it throws: > > TypeError: bad operand type for unary ~: 'R

[web2py] Re: How to create a "doesn't belong" query, is it possible?

2013-04-10 Thread Tito Garrido
Just figured out: ~db(db.log.severity.belongs((1, 2))).select() Thanks! On Wed, Apr 10, 2013 at 10:11 PM, Tito Garrido wrote: > Hi Folks, > > How can I negate: > > db(db.log.severity.belongs((1, 2))).select() > > > I'd like to create a grid with records that

[web2py] How to create a "doesn't belong" query, is it possible?

2013-04-10 Thread Tito Garrido
Hi Folks, How can I negate: db(db.log.severity.belongs((1, 2))).select() I'd like to create a grid with records that does not belong to a specific list... Regards, Tito -- Linux User #387870 . _/_õ|__| ..º[ .-.___.-._| . . . . .__( o)__( o).:___ -- --- You received

Re: [web2py] Re: How to benchmark my web2py website? I have got scary results :-/

2013-04-07 Thread Tito Garrido
appen. > You want load testing programs to see as much content as possible and you > want them to mimic the live traffic as realistically as possible. Sadly, > this is pretty hard to achieve. When testing web2py apps, I've had better > results from siege than ab. > > Regards, &g

Re: [web2py] Re: How to benchmark my web2py website? I have got scary results :-/

2013-04-06 Thread Tito Garrido
Got it... I have noticed that some big websites like terra.com.br when I run ab against their "home line" returns just some kbytes causing a very fast response, How could I do that? On Sat, Apr 6, 2013 at 4:46 PM, Brian M wrote: > +1 on the quality/speed of the connection you test from making a

Re: [web2py] Re: Is there a way to cache images from "download" function?

2013-04-06 Thread Tito Garrido
Now it works! I just changed the return function to return response.stream(open(filename,'rb')) :D Thanks folks! PS: How to use @client-cache? :) Regards, Tito On Sat, Apr 6, 2013 at 1:36 PM, Tito Garrido wrote: > Hi Folks! > > Thanks for your answers but my implementat

Re: [web2py] Re: Is there a way to cache images from "download" function?

2013-04-06 Thread Tito Garrido
.headers['Cache-**Control'] = "max-age=604800" >>>>del response.headers['Pragma'] >>>>del response.headers['Expires'] >>>>filename = os.path.join(request.folder,'**uploads',request.args(0)) >>>>

[web2py] Is there a way to cache images from "download" function?

2013-04-05 Thread Tito Garrido
Hi! I was running page speed on my website and all image files from the database (upload folder) are not cached... Is there a way to enable cache for them? Thanks! Tito -- Linux User #387870 . _/_õ|__| ..º[ .-.___.-._| . . . . .__( o)__( o).:___ -- --- You received th

[web2py] How to benchmark my web2py website? I have got scary results :-/

2013-04-05 Thread Tito Garrido
Hi Folks! I am trying to use ab to benchmark my website that is hosted on linode (512MB RAM) using nginx + mysql + web2py, installed via the install script provided in the book. Should I point ab to my index? I have been running some tests and the results are scary... Server Software:ngi

[web2py] Help on fake_migration

2013-04-05 Thread Tito Garrido
Hi Folks! I am trying to migrate my web2py application from one server to another. I have pack my application and restored the MYSQL database but when I tried to run it there I got: InternalError: (1050, u"Table 'auth_user' already exists") I h

Re: [web2py] Re: Why compute does not work to get image filename?

2013-03-27 Thread Tito Garrido
tribute from fields, not compute. >>>> El mar 27, 2013 3:07 PM, "Niphlod" escribió: >>>> >>>> boys . how can the id be present if what you're trying to insert is >>>>> not yet a row in a table >>>>> >>

Re: [web2py] Re: Why compute does not work to get image filename?

2013-03-27 Thread Tito Garrido
I just checked... id is not present: "" On Wed, Mar 27, 2013 at 2:24 PM, Roberto Perdomo wrote: > Try: > > Field('image_filename', readable=False, writable=False, compute = lambda > row: request.post_vars.image.filename + row.id), > El mar 27, 2013 12:39 PM

Re: [web2py] Re: Why compute does not work to get image filename?

2013-03-27 Thread Tito Garrido
How could I also append the id of the row in image_filename? Thanks! Tito On Mon, Mar 25, 2013 at 4:58 PM, Tito Garrido wrote: > Worked! It should go to the book :) > http://web2py.com/books/default/chapter/29/07#Storing-the-original-filename > > Thanks! > > Tito > >

Re: [web2py] Re: Why compute does not work to get image filename?

2013-03-25 Thread Tito Garrido
=False, writable=False, compute = lambda > row: request.post_vars.image.filename), > > > On Monday, 25 March 2013 13:28:19 UTC-5, Tito Garrido wrote: >> >> Hi! >> >> Why this does not work: >> Field('image', 'upload', requires=IS_NOT_EMPTY()

[web2py] Why compute does not work to get image filename?

2013-03-25 Thread Tito Garrido
Hi! Why this does not work: Field('image', 'upload', requires=IS_NOT_EMPTY(), uploadseparate=True, autodelete=True,), Field('image_filename', readable=False, writable=False, compute = lambda row: row.image.filename), Using a form I can follow the book and fill the image filename: if reque

Re: [web2py] Re: Help on a web2py query

2013-03-23 Thread Tito Garrido
On Friday, March 22, 2013 11:41:06 PM UTC+1, Tito Garrido wrote: > >> db.define_table('novela', >> Field('nome', requires=IS_NOT_EMPTY()), >> Field('emissora', 'reference emissora', requires = IS_IN_DB(db, >> db.emissora.id,&#x

Re: [web2py] Re: Help on a web2py query

2013-03-22 Thread Tito Garrido
;novela" This works: db.executesql("SELECT * FROM (SELECT * FROM capitulo WHERE data_de_exibicao >= CURDATE() ORDER BY data_de_exibicao) AS c INNER JOIN novela n ON c.novela = n.id WHERE encerrada = false GROUP BY c.novela limit 0,3;",as_dict=True) But I would lose the ab

[web2py] Help on a web2py query

2013-03-22 Thread Tito Garrido
Folks, How could I implement: SELECT * FROM (SELECT * FROM capitulo WHERE data >= CURDATE() ORDER BY data) WHERE encerrada = false GROUP BY c.cod_anothertable Regards, Tito -- Linux User #387870 . _/_õ|__| ..º[ .-.___.-._| . . . . .__( o)__( o).:___ -- --- You receive

Re: [web2py] Webfaction out of memory? Hardly seems possible

2013-03-21 Thread Tito Garrido
I am also having memory issues on dreamhost VPS... only 3 people accessing it... On Thu, Mar 21, 2013 at 4:46 PM, Cliff Kachinske wrote: > Can anyone shed light on this? > > Webfaction shut me down this morning at a very inconvenient time, claiming > that I had exceeded my 256 Meg of memory. >

[web2py] How can I run multiple applications with multiple domains on nginx?

2013-03-18 Thread Tito Garrido
Hi Folks, I am reading the book section: http://web2py.com/books/default/chapter/29/13#Nginx But I couldn't figure out how could I setup nginx to serve multiple domains pointing to a different application on the same web2py instance. Do you have any example? like: mydomain1 -> /home/www-data/we

[web2py] Is Dreamhost passenger a good option for production?

2013-03-15 Thread Tito Garrido
Hi Folks! I used to have a shared host on dreamhost using passenger wsgi but I got some memory issue and transferred my website to their VPS. What is the best option for production on a VPS? We are using 300MB RAM account, all select are cached using cache mem... I can see some spikes and the we

[web2py] How to hide the controller from the url using URL() function

2013-03-07 Thread Tito Garrido
Hi folks, I have put some info on my routes.py: default_application = 'myapp'# ordinarily set in base routes.py default_controller = 'default' # ordinarily set in app-specific routes.py default_function = 'index' # ordinarily set in app-specific routes.py I can see that the URL function

Re: [web2py] How can I avoid 2 different users to run the same function at the same time?

2013-03-04 Thread Tito Garrido
Hi Ron, Thanks for you response, I need this because I have a function that clear a table, read a bunch of local files and import it into the database. I just want to avoid 2 people cleaning the table or maybe people querying the table while it is being updated... On Mon, Mar 4, 2013 at 10:10 PM

[web2py] How can I avoid 2 different users to run the same function at the same time?

2013-03-04 Thread Tito Garrido
Hi Folks, I would like to avoid 2 different users to run the same function while the it is already running. Example: User 1 is running my_function, while it is running, if User 2 tries to run it the application should warn that it is already in execution Thanks! Tito -- Linux User #387870 ..

Re: [web2py] Re: web2py 2.4.2 is OUT

2013-03-04 Thread Tito Garrido
Is SQLFORM.grid translatable now? :) Thanks! Tito On Mon, Mar 4, 2013 at 5:07 PM, Niphlod wrote: > ps: version check fails because it expects > > version (date) stable/dev > > instead of the current format > > Version 2.4.2 (stable) 2013-03-04 03:26:21 > > > On Monday, March 4, 2013 5:13:34 P

[web2py] How to set the form id on a custom form?

2013-02-16 Thread Tito Garrido
Hi Folks! I am trying to set an id on a custom form but it does not work, I have tryed: form['_id']='myform' form.custom['id'] = 'myform' form.custom['_id'] = 'myform' form.custom.id = 'myform' form.custom._id = 'myform' The first one works if I do not use custom forms... So how can I set it to a

[web2py] Trying to use dropdown plugin but it does not work

2013-02-13 Thread Tito Garrido
Hi Folks, I am trying to use the dropdown plugin from: http://web2py.com/plugins/default/dropdown And I am getting name 'PluginDropdown' is not defined Is it still supported? Is there any other better alternative? Thanks! Tito -- Linux User #387870 . _/_õ|__| ..º[ .-.___

[web2py] How to clear just some fields on keepvalues=True?

2013-02-13 Thread Tito Garrido
How to clear just some fields on keepvalues=True? Thanks! Tito -- Linux User #387870 . _/_õ|__| ..º[ .-.___.-._| . . . . .__( o)__( o).:___ -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this

[web2py] Custom form does not show the extra field of a SQLFORM

2013-02-13 Thread Tito Garrido
Hi Folks, I am trying to add a hidden field on a SQLFORM like this: *form=SQLFORM(db.produto) tags = TR(INPUT(_name='tags_hidden',value=True,_type='hidden')) form[0].insert(-1,tags)* {{=form.custom.widget}} it does not show this extra field: , 'preco_custo': , 'tipo': , 'tags': , 'pre

Re: [web2py] Re: how to support video in an app

2013-02-07 Thread Tito Garrido
How to set the width and height of the embed video using expand_one? On Sat, Feb 2, 2013 at 12:00 AM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > Sorry my bad: > > {{=XML(expand_one('http://www.**youtube.com/watch?v=** > 7yvt2Pt6LRA',cache.ram('**mycache',lambda:dict(),3600))

  1   2   3   4   >