[web2py] Re: postgres unix_sock

2019-04-26 Thread xgp . latino
db = DAL( 'postgres://***:@localhost/dbname', 'unix_socket:/tmp/.s.PGSQL.5432', migrate=True, lazy_tables=False, ) For those who needed. Cheers, El viernes, 26 de abril de 2019, 18:31:42 (UTC-5), xgp@gmail.com escribió: > > Hi, > > Someone please share the correct DAL string when us

[web2py] postgres unix_sock

2019-04-26 Thread xgp . latino
Hi, Someone please share the correct DAL string when using a unix sock with postgres. Thanks, -- 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 Issues) --- You rec

[web2py] Good service practice

2019-02-26 Thread xgp . latino
Hello, Im a newbie coder. Im implementing an android app which make json post to web2py and transfer data in and out. Actually my process is working, but I want to know if what i coded is right and offers the best performance. def anyfunction(): if request.vars.var1 == "something1":

[web2py] Re: URL function in admin app adds "/_2.17.1/" to path variable

2019-02-19 Thread xgp . latino
Hi, Im using lighttpd. Default deploy example from manual doesnt allow css files to load becasue of the version control of static files i understand, correct me if im wrong. Cheers, El lunes, 18 de febrero de 2019, 19:20:00 (UTC-5), Dave S escribió: > > > > On Monday, February 18, 2019 at 2

[web2py] Re: URL function in admin app adds "/_2.17.1/" to path variable

2019-02-18 Thread xgp . latino
Hi, Sorry for my ignorance. How do you do that? Ive been trying without sucess using rewrite module. Cheers, El miércoles, 29 de agosto de 2018, 10:37:53 (UTC-5), Anthony escribió: > > The admin app uses the built-in static versioning functionality, as > described here: > http://web2py.com/b

[web2py] Re: Lighttpd deploy issue

2019-02-17 Thread xgp . latino
Hi, My conf: $HTTP["host"] =~ "sub.domain.com$" { server.document-root="/home/www-data/web2py" url.rewrite-once = ( "^(/.+?/static/.+)$" => "/applications$1", "(^|/.*)$" => "/handler_web2py.fcgi$1", ) } $SERVER["socket"] == ":443" { ssl.engine = "enable" ssl.pemfi

[web2py] Lighttpd deploy issue

2019-02-17 Thread xgp . latino
Hi everyone, I'm deploying lighttpd server. Sites are working normal either http or https. But admin site doesnt load scripts and render plain. Here is the error log: 2019-02-17 13:18:41: (response.c.565) -- handling physical path 2019-02-17 13:18:41: (response.c.566) Path : /xxx/usr/w

[web2py] Re: Select query returns value with type

2016-10-27 Thread xgp . latino
Anthony, >From i what i read from you, DAL returns int with type long int attached.Ex:9632L. If i want a string then i must str( row ). How do i get the int without type description, Ex: [2015L, 6249L, 2016L, 9632L], [2015, 6249, 2016, 9632] Do you get me? Regards, El jueves, 27 de octub

[web2py] Re: Select query returns value with type

2016-10-27 Thread xgp . latino
Anthony, Thanks for your reply. What happens if i need the int not the str? Do i parse it twice? Regards, El jueves, 27 de octubre de 2016, 0:34:41 (UTC-5), Anthony escribió: > > The DAL parses all integer values into Python *long* integers >

[web2py] Select query returns value with type

2016-10-26 Thread xgp . latino
Hi all, Got this query: for row in db().select( db.X.YY.year(), distinct=True, orderby=db.X.YY.year(), ): ayears.append( row[ db.X.YY.year() ] ) count = db( db.X.YY.year() == row( db.X.YY.year() ) ).count() Don't know why all rows return the

Re: [web2py] Buying a template for the community...

2015-10-11 Thread xgp . latino
Angelo, Can i trouble you asking for directions for adapting this http://startbootstrap.com/template-overviews/sb-admin-2/ to web2py? I can't make things work. Regards, El domingo, 11 de octubre de 2015, 2:34:26 (UTC-5), AngeloC escribió: > > I Jason, > > 2015-10-11 9:24 GMT+02:00 Jason (

[web2py] Re: requires=IS_DATE() leads to ('str' object has no attribute 'year')

2015-06-12 Thread xgp . latino
Nevermind, I have to manually change field type to DATE due to not autocasting content of the field of web2py. Cheers, El viernes, 12 de junio de 2015, 15:11:34 (UTC-5), xgp.l...@gmail.com escribió: > > I know this is way too old but is happening to me. After Massimo > suggestion changes i

[web2py] Re: requires=IS_DATE() leads to ('str' object has no attribute 'year')

2015-06-12 Thread xgp . latino
I know this is way too old but is happening to me. After Massimo suggestion changes i get: ('ERROR', '42804', 'column "fechaingreso__tmp" is of type date but expression is of type character varying') Any ideas. Regards, El miércoles, 9 de octubre de 2013, 20:03:50 (UTC-5), Massimo Di Pierr

[web2py] Re: Remove query db field

2014-03-31 Thread xgp . latino
Hi all. Right now i have made this: In controller i select rows: detalleusuario = db(db.hcpacientes.noid==form.vars.noid).select('hcpacientes.tid', 'hcpacientes.noid', 'hcpacientes.nombre').first() Then in views, i display same variable with identifier fields: {{=detalleusuario.tid}} {{=deta

[web2py] Re: Remove query db field

2014-03-28 Thread xgp . latino
Mandar. Thank you very much. I will try a different aproach. Regards On Tuesday, March 25, 2014 11:30:01 PM UTC-5, xgp.l...@gmail.com wrote: > > Hi all. > > As mostly may know, when doing a select query the result will show a db > field title for each column. > > How do i remove or change t

[web2py] Re: Remove query db field

2014-03-26 Thread xgp . latino
Mandar, I use DAL to make a select to my db. I get field name's as titles and then content of select. variable = db(db.hcregistros.id=="1").select('hcregistros.noid','hcregistros.fecha','hcregistros.registro') *hcregistros.noid hc*cregistros.fecha hcregistros.reg

Re: [web2py] Remove query db field

2014-03-26 Thread xgp . latino
Johann, I never said i was using smartgrid, i use a simple db select query. Bests. El miércoles, 26 de marzo de 2014 05:22:29 UTC-5, Johann Spies escribió: > > On 26 March 2014 06:30, > wrote: > >> >> As mostly may know, when doing a select query the result will show a db >> field title for

[web2py] Remove query db field

2014-03-25 Thread xgp . latino
Hi all. As mostly may know, when doing a select query the result will show a db field title for each column. How do i remove or change this db field title for some nice header as use with smartgrid.? Thanks. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http:

[web2py] Re: Login form adittional fields

2014-03-22 Thread xgp . latino
Hi Leonel, I need to authenticate 3 fields instead if usual 2. Because i need to used identification number and type of identification document and the usual password to login. Gonna try login_bare. Thanks. El viernes, 21 de marzo de 2014 22:51:21 UTC-5, Leonel Câmara escribió: > > I don't g

[web2py] Login form adittional fields

2014-03-20 Thread xgp . latino
Hi all, After looking everywhere, have no more choice but to ask. I defined a custom auth.table with custom fields. Login via 1 of these fields and password on custom login form based on form.custom.widget is working flawlessly. Problem is, now i have to authenticate using 3 fields from this c

[web2py] Re: Nested SQLform.factory

2014-03-06 Thread xgp . latino
Hi all, and thanks for your replies. I intent to use the sqlform.factory to create dropdown list from DB data as inputs for a form. Why.? Because i want to use predefine values store on DB as a list for dropdown. The form actually works as view, but only the 1st input value of the 1st dropdown

[web2py] Re: Nested SQLform.factory

2014-03-06 Thread xgp . latino
Anthony, It is just a form with 2 sqlform.factory based on DB dropdown lists. 1st values passes to form.vars, second do not. Is it possible to have many sqlform.factory based on DB dropdown lists on same form ?? Thanks.! On Wednesday, March 5, 2014 9:11:58 AM UTC-5, Anthony wrote: > >

[web2py] Nested SQLform.factory

2014-03-05 Thread xgp . latino
Hi all, I have a Nested SQLform.factory inside a custom fields form. My code: form = FORM(TABLE(TR("Numero de documento:",INPUT(_type="text",_name="noid",requires=IS_NOT_EMPTY()),requires=IS_NOT_IN_DB(db, 'tabla1.noid')), TR("Tipo de documento:" , SQLFORM.factory(Field('ti