[web2py] Help with project (many to many form or table)

2020-01-17 Thread Juan Gutiérrez
Hello, I'm creating a small project to test the use of web2py. After going through some of the documentation for web2py I've found myself in quite a problem to deal with a many to many insert/update form. The simplified context for the example is this: Model: There are people (person) and each c

[web2py] Re: Help with request.args() and SQLFORM.grid(). Error 404

2020-01-15 Thread Juan Gutiérrez
20 at 1:04:00 AM UTC-5, Juan Gutiérrez wrote: > > This sounds crazy but I'm getting an error 404 when using in the same > function this lines together: > > test = db.test(request.args(0,cast=int, otherwise=URL('index'))) or > redirect(URL('index')) >

[web2py] Help with request.args() and SQLFORM.grid(). Error 404

2020-01-14 Thread Juan Gutiérrez
This sounds crazy but I'm getting an error 404 when using in the same function this lines together: test = db.test(request.args(0,cast=int, otherwise=URL('index'))) or redirect(URL('index')) grid = SQLFORM.grid(db(db.test.id == 2), deletable=False, editable=True) When I comment either one of th

Re: [web2py] web3py -> py4web

2019-09-05 Thread Juan M. Chapa Z.
Great! El jul 24, 2019 12:40 a.m., "Massimo Di Pierro" escribió: > OK. I know. I am not good with names. > But there are lots of requirements to be fulfilled. > py4web.com was available and the pypi package was available. > Here is running on google cloud: > http://py4web.com/ > > Ducking... > >

Re: [web2py] bye bye T, welcome pluralize

2019-05-03 Thread Juan M. Chapa Z.
Hi Massimo! I think is great, as long as you keep both available 'cause pluralize seems to be great for countable objects and stats, while T should still be available for real translations. Those are different stuff. On Fri, Apr 26, 2019 at 12:53 AM Massimo Di Pierro < massimo.dipie...@gmail.com>

[web2py] Re: response.download

2017-05-24 Thread Juan Carlos Quesada
This works, thank you Massimo El viernes, 26 de abril de 2013, 18:07:06 (UTC+2), Massimo Di Pierro escribió: > > Please open a ticket about this. The problem is that the roles of > downloading is delegated to the field which stores the upload name. In this > case it was uploaded using a SQLFORM

[web2py] Re: Select filled with years

2017-04-18 Thread Juan Carlos Quesada
def getyears(anyo): from datetime import datetime, date option = [] option.append(OPTION(T('Año'), _value='')) year = datetime.today().year ryear = range(2015, int(year+1)) for r in ryear: if anyo == r: selected = True else: selecte

[web2py] [Contribution] Generate Map using google maps sql and web2py

2017-04-07 Thread Juan Carlos Quesada
function initMap() { var myLatLng = {lat: 40.4636670001, lng: -3.74922366}; var map = new google.maps.Map(document.getElementById('map'), { zoom: 5, center: myLatLng }); var markers = []; {{ associa = db.as

Re: [web2py] Re: Need help displaying value from the controller to view

2015-04-12 Thread Juan Sanjur
I was able to figure it out but i couldnt undo the post. Thanks Sent from Type Mail On 11:09, Apr 11, 2015, at 11:09, Rufus wrote: >Just return it as a dictionary value: > >def index(): > return dict(message='LED Test - Main Menu',pinstatus=GPIO.input(22)) > >You should be able to figure ou

[web2py] Re: UPDATED AGENDA! Bay Area web2py meetup (refreshments) -- 12/5/2014, 6:30PM - 9:00PM -- BE THERE!!!

2014-12-03 Thread Juan Shishido
So glad I came across this. I'll be there. Thanks! Looking forward to it. J On Wednesday, November 5, 2014 11:48:14 PM UTC-8, weheh wrote: > > *Massimo Di Pietro, web2py's originator, will attend our own Bay Area* > *web2py > meetup* to meet, greet and present. Additional talks by Dexter Hadley

[web2py] Re: sqlform.grid with linked tables

2014-05-21 Thread Juan Luis
thank you stifan, represent is what I needed to know and your example worked perfect. My primary problem is that i am not able to see my other table in SQLFORM.grid. Here I try to create two columns; one from db.contact and the other from db.task. Can my error be noticed? On Tuesday, May 2

[web2py] sqlform.grid with linked tables

2014-05-20 Thread Juan Luis
Hola, yes learning web2py basics. Could someone explain what I need to do to generate a sqlform.grid with two tables (one to many) that provides an href in one column? The table i want to create would look like: Contact | URL ---

[web2py] DAL: How to check for empty list:string when using mongodb

2014-05-09 Thread Juan Luis
This is in relation to http://stackoverflow.com/questions/23367218/web2py-dal-how-to-check-liststring-type-items-for-none Answer works when tested on sqlite but does not work for Mongodb In [4]: db.Tasks.email != [ ] Creates the mongo query : Out[4]: In mongo shell: > db.Ta

[web2py] Hosting para Web2py

2013-10-04 Thread Juan Carlos Gonzales Vitte
Hola a todos mi nombres es Juan Carlos, quiero implementar una pagina web en web2py, y desearia que alguien me pueda recomendar un hosting para la pagina, tambien quiero saber con quienes podriamos conversar sobre web2py, tenia la idea de hacerlo mas conocido enviando representantes o

[web2py] Re: Encoding problem in 'format' from define_table on GAE

2013-08-22 Thread juan
x.id) for x in refs) or '') > > always works but for now it is in trunk. > > On Wednesday, 21 August 2013 19:26:45 UTC-5, juan wrote: >> >> The issue wasnt completely resolved that way, there were problems with >> list:reference in updates and some weird behavi

[web2py] Re: Encoding problem in 'format' from define_table on GAE

2013-08-21 Thread juan
Thanks Massimo for this great tool. El martes, 20 de agosto de 2013 10:31:13 UTC-5, juan escribió: > > Well, I found a solution for this strangely undocumented issue: > > format=lambda r: r.nombre.decode("utf-8", 'ignore') + ' - ' + > str(r.precio) + 

[web2py] Re: Encoding problem in 'format' from define_table on GAE

2013-08-20 Thread juan
#x27;ignore' isn't neccesary, but I left there just in case. El lunes, 19 de agosto de 2013 12:26:56 UTC-5, juan escribió: > > Thank you Massimo, > > but how can it be resolved when the format attribute must represent fields > in the database with special chars?. I mean,

[web2py] Re: Encoding problem in 'format' from define_table on GAE

2013-08-19 Thread juan
eplace > format="%(nombre)s - %(precio)s€" > > with > > format= "%(nombre)s - %(precio)s\xe2\x82\xac" > > because labels mush be in ascii (or utf8) but not unicode. > > On Wednesday, 14 August 2013 15:57:24 UTC-5, juan wrote: >> >> Hello, >&

[web2py] Encoding problem in 'format' from define_table on GAE

2013-08-15 Thread juan
Hello, It seems that the format option in db.define_table isn't working properly when deployed on GAE. Please, consider these two tables: db.define_table('ingrediente', Field('nombre', 'string', requires=IS_NOT_EMPTY(error_message='Se ha de indicar el nombre')),

[web2py] Re: Dynamic fields in dal

2013-07-16 Thread Juan BC
On Tuesday, 16 July 2013 16:47:48 UTC-3, Alan Etkin wrote: > > db = DAL('sqlite:custom://') >> > > Awsome! Does the postgres adapter supports this also? > can i redefine the adapter sqlite whitout breaking something? ADAPTERS['sqlite'] = type("InDBSQLiteAdapter", (UseDatabaseStoredFile, S

[web2py] Re: Dynamic fields in dal

2013-07-16 Thread Juan BC
btw i have this error whitout importing all gluon RuntimeError: only MySQL/Postgres can store metadata .table files in database for now On Tuesday, 16 July 2013 16:47:48 UTC-3, Alan Etkin wrote: > > db = DAL('sqlite:custom://') >> > > Awsome! Does the postgres adapter supports this also? >

[web2py] Re: Dynamic fields in dal

2013-07-16 Thread Juan BC
On Tuesday, 16 July 2013 09:51:22 UTC-3, Alan Etkin wrote: > > Why 1? .table is there exactly to allow you to do what you are trying to >> do. > > > I think Juan wants to avoid writing those .table files to the filesystem. > I'm not sure that is supported.

[web2py] Dynamic fields in dal

2013-07-15 Thread Juan BC
actually im working on kdd/dataminning science proyect, and i try to port the connection code from Peewee-orm to dal. the requirements of my project are this: 1 - i need to create a db without a .tables file2 - some variables fields are added dynamically and stored in a diferent table3 - My exa

[web2py] Error in DAL when creating indexes in web2py 2.0.6 with PostgreSQL

2012-09-04 Thread Juan Diego Romero González
Hi. I'm having this error since I update to 2.0.2 when executing executesql() no results to fetch 7201. 7202. 7203. 7204. 7205. 7206. 7207. 7208. 7209. 7210. # will hold our finished resultset in a list data = adapter.cursor.fetchall() # convert the list for

[web2py] Re: web2py 2.0.2 is out

2012-08-30 Thread Juan Diego Romero González
The problem I have with the admin application comes from this import. from gluon.languages import (regex_language, read_possible_languages, lang_sampling, read_dict, write_dict, read_plural_dict, write_plural_di

Re: [web2py] Re: table, grid, smartgrid, getting better

2011-08-28 Thread Juan Tiger
I using sqlite, alter table does not support drop columns, so you must try a fresh install 2011/8/24 Johann Spies > > TypeError: () takes exactly 1 argument (2 given) >> >> >> > I still get this error with the following model (all 'represent' lines > commented out): > > db.define_table('akb_ar

Re: [web2py] Re: web2py hosting

2011-08-24 Thread Juan Tiger
I'm shocked with fluxflex! less than 1 min to get free account + subdomain + web2py installation ... install bluezone.fluxflex.com 2011/8/24 Massimo Di Pierro > fluxflex.com > > On Jul 7, 8:50 am, stargate wrote: > > For hosting I would usehttps://www.dotcloud.com/But only for big > > projec

Re: [web2py] Re: adopt an app!

2011-08-09 Thread Juan Hernandez
count me in! On Tue, Aug 9, 2011 at 10:31 AM, Gour-Gadadhara Dasa wrote: > On Tue, 9 Aug 2011 07:50:26 -0700 (PDT) > Massimo Di Pierro > wrote: > > > Good idea. Would you like to open the issue? Else I can do it. > > I can do it...but do you think about one issue for all or one issue per > app?

[web2py] Re: dict.__getitem__(self, key) KeyError: 'nombre'

2011-06-25 Thread Juan Antonio
#x27;, writable=False), Field('cerrado', writable=False, default='no'), Field('lote_fabricado', db.lote, writable=False), Field('observaciones', widget=SQLFORM.widgets.text.widget), format='%(nombre)s')) So that's it. Juan A.

[web2py] dict.__getitem__(self, key) KeyError: 'nombre'

2011-06-24 Thread Juan Antonio
gastado', 'double'), Field('coste_unitario', 'double')) when I click on 'db.fab_lote ' in the database admin api I get: Traceback (most recent call last): File "/home/jaromero/juan/programacion/web2py/gluon/restricted.py", line 192, in restr

Re: [web2py] Re: MySQL, encrypt() and CRUD

2011-03-11 Thread Juan Hernandez
Thanks a lot Massimo, I'll let you know what happens vj On Fri, Mar 11, 2011 at 12:17 PM, Massimo Di Pierro wrote: > You can do it with dal.SQLCustomType > > If you cannot find a useful example, let me know and I will write one. > > On Mar 11, 10:13 am, Juan Hernandez wrot

Re: [web2py] Re: MySQL, encrypt() and CRUD

2011-03-11 Thread Juan Hernandez
In MySQL would go something like this #Insert insert into users (domain, email, password, quota) values (1, 'x...@x.com', ENCRYPT('mypass'), '101010'); # mysql> select * from users; | 3 | 1 | x...@x.com | j57VHP.kk4c.o | 101010 | 1 row in set (0.00 sec) and reading MySQL's docs I saw this:

[web2py] Re: SQLFORM and read-only references

2011-02-09 Thread Juan Antonio
Yes, the nightly built works fine. Thanks. On 7 feb, 15:44, Massimo Di Pierro wrote: > Should be fixed in trunk already. Try the nightly built. > > On Feb 7, 4:46 am, Juan Antonio wrote: > > > I have > > > db.define_table('article', Field('name

[web2py] Re: SQLFORM and read-only references

2011-02-07 Thread Juan Antonio
b.lote,..,readonly=True) shows 'None' in field articulo I think it is the same proble discussed here, or what am I doing wrong? I am using 1.91.6 Cheers, Juan. On 4 feb, 13:46, Kenneth wrote: > I´m having the same problem. In a SQLFORM I have a Field that is > sometimes wr

[web2py:23293] Re: Event-style locking in web2py?

2009-06-04 Thread Juan
or in web2py code. I think it would be possible by spawning processes but that would be some kind of dirty workaround. I am looking for a more straightforward solution (if any). Any hint shall be appreciated. thank you Juan On 3 jun, 21:21, mdipierro wrote: > You should not start a thread from

[web2py:23231] Event-style locking in web2py

2009-06-03 Thread Juan
reading.Event() def lock(): session.forget() session._unlock(response) e.wait(60) return 'ready' def release(): e.set() return 'done' [/code] thanks Juan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Go

[web2py:16459] Re: Multiple Forms Issue

2009-02-17 Thread Juan Andres Ramil
ar" "Nuevo Recurso" and "Agregar" 5.- Click on "Agregar" with the selected values at the form at the fields "recurso" and "objetivo". At this point, the error should happend. Let me know if you need any other detail. Thanks! Juan 2009/2/17

[web2py:16428] Re: Multiple Forms Issue

2009-02-17 Thread Juan Andres Ramil
Yes it's working perfectly. Thanks! Juan 2009/2/15 mdipierro > > I believe this is fixed now in trunk but needs to be tested. Can you > please try it works with your code? > > Massimo > > On Feb 15, 9:15 am, mdipierro wrote: > > Yes this is a bug introduced i