[web2py] Re: Using parse_as_rest: problem with cross joins?

2019-05-17 Thread Massimo Di Pierro
Hello David, I recommend moving the the new DBAPI (other thread). Do not know the parse_as_rest will be supported very much in the near future. Got very little traction. On Friday, 17 May 2019 08:24:13 UTC-7, David Orme wrote: > > Hi, > > I'm looking at parse_as_rest() to provide an API and

Re: [web2py] Re: new DBAPI in pydal for both web2py and web3py

2019-05-17 Thread Massimo Di Pierro
How about restapi or friendlyql? I do not want to tie this to web3py or dal too much. there is no reason this syntax cannot be ported to other ORMs On Friday, 17 May 2019 10:02:24 UTC-7, John Bannister wrote: > > As you are da man I would suggest DaQL .. DALQL is a bit of a mouth full J > > >

Re: [web2py] Re: Web3py

2019-05-17 Thread Massimo Di Pierro
Also, web3py uses this: https://pypi.org/project/reloader/ The docs have an example. Does this module work for you? On Friday, 17 May 2019 22:12:39 UTC-7, Massimo Di Pierro wrote: > > Does it print this when you press [reload]? > > [OK] reloaded _dashboard > [OK] reloaded myapp > [OK]

Re: [web2py] Re: Web3py

2019-05-17 Thread Massimo Di Pierro
Does it print this when you press [reload]? [OK] reloaded _dashboard [OK] reloaded myapp [OK] reloaded todo [OK] reloaded superheroes [OK] reloaded examples [OK] reloaded _scaffold On Friday, 17 May 2019 16:03:18 UTC-7, John Bannister wrote: > > For me I have not

Re: [web2py] Re: I can not import module in app

2019-05-17 Thread Dave S
On Friday, May 17, 2019 at 2:49:45 PM UTC-7, Константин Комков wrote: > > Check line 8 in error, it already contain import mytest, in another > project i can import that module. > The working application has a modules/_init__.py file; does the excepting app have that? /dps > пт, 17 мая

[web2py] Re: why am I getting "duplicate key value violates unique contraint"?

2019-05-17 Thread Dave S
On Friday, May 17, 2019 at 3:57:39 PM UTC-7, Dave S wrote: > > As mentioned in another thread, I recently moved one of my tables from > sqlite to postgres. Importing data all went well. For a while, inserts > went well, also. But then I started getting ERROR 23505 (dup key). Can I >

Re: [web2py] Re: A question about ajax function (passing a string parameter over)

2019-05-17 Thread Anthony
On Friday, May 17, 2019 at 5:17:09 PM UTC-4, Vlad wrote: > > Also, I think it would be nice if URL helper would have ability to handle > this, without a need to figure out the encoding/decoding subject... > You don't need the encoding -- just put the values in the query string. Anthony --

Re: [web2py] Re: Web3py

2019-05-17 Thread John Bannister
For me I have not installed any npm or other. Clean python 3 virtual environment into which I installed web3py on Ubuntu. Base install on windows 10 as well same. All works fine apart from the reloading. I can try to set up on one of my Centos 7 servers later tomorrow but am pretty sure its

[web2py] why am I getting "duplicate key value violates unique contraint"?

2019-05-17 Thread Dave S
As mentioned in another thread, I recently moved one of my tables from sqlite to postgres. Importing data all went well. For a while, inserts went well, also. But then I started getting ERROR 23505 (dup key). Can I blame this on pg8000? [I have an open question on getting hooked up to

Re: [web2py] Re: I can not import module in app

2019-05-17 Thread Константин Комков
Check line 8 in error, it already contain import mytest, in another project i can import that module. пт, 17 мая 2019 г., 18:59 Leonel Câmara : > Inside the application which has the module in its modules folder all you > need is "import mytest" > > -- > Resources: > - http://web2py.com > -

Re: [web2py] Re: Web3py

2019-05-17 Thread 黄祥
> > Editing apps and reloading forks for me. Please try again and let's try > figure out why does not work for you. > after tried latest commit (110), guess when it's work on you, but not work on us, perhaps related with module installed (python or js via npm) on your side, but not installed

Re: [web2py] Re: A question about ajax function (passing a string parameter over)

2019-05-17 Thread Eliezer (Vlad) Tseytkin
Also, I think it would be nice if URL helper would have ability to handle this, without a need to figure out the encoding/decoding subject... On Fri, May 17, 2019, 5:03 PM Eliezer (Vlad) Tseytkin < westgate6...@gmail.com> wrote: > Okay, I got it :) > > Very embarrassing. There were some prior

Re: [web2py] Re: A question about ajax function (passing a string parameter over)

2019-05-17 Thread Eliezer (Vlad) Tseytkin
Okay, I got it :) Very embarrassing. There were some prior entries in the database that weren't converted to begin with, so when they were pulled over, the exception was raised. I totally forgot about them, and on top of that the one that caused the trouble was just one character different from

Re: [web2py] Re: Web3py

2019-05-17 Thread John Bannister
Update on this :- Just tried it on native windows10 python3.7 and same results. New functions return error 404 until server restart. BR John On Friday, 17 May 2019 18:49:28 UTC+2, 黄祥 wrote: > > problem still exist (in commits 110) only superheroes app traceback error > is gone when hit

RE: [web2py] Re: new DBAPI in pydal for both web2py and web3py

2019-05-17 Thread John Bannister
As you are da man I would suggest DaQL .. DALQL is a bit of a mouth full J From: web2py@googlegroups.com [mailto:web2py@googlegroups.com] On Behalf Of Massimiliano Sent: 17 May 2019 18:56 To: web2py@googlegroups.com Subject: Re: [web2py] Re: new DBAPI in pydal for both web2py and web3py

Re: [web2py] Re: new DBAPI in pydal for both web2py and web3py

2019-05-17 Thread Massimiliano
DALQL On Fri, May 17, 2019 at 5:42 PM Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > I am embarrassed I have forgotten all about latin. :-( > > The italian equivalent would be "accesso" but does not sound nice to me. > > I am not too concerned about naming conflicts as long as the

Re: [web2py] Re: Web3py

2019-05-17 Thread 黄祥
problem still exist (in commits 110) only superheroes app traceback error is gone when hit 'reload apps': 1. 'routes for ' disappears after hit 'reload apps' for : - scaffold - myapp but for _dashboard, example, todo still exist (appears as expected) 2. editing and adding new function in

[web2py] Re: A question about ajax function (passing a string parameter over)

2019-05-17 Thread Anthony
On Friday, May 17, 2019 at 12:20:37 PM UTC-4, Vlad wrote: > > It works almost, but not 100% :) > > with encodeURIComponent : > > abc def (test) > comes back as > abc_def__test_ > Please show your exact code. Doesn't sound like you are using the query string. Anthony -- Resources: -

RE: [web2py] Re: Web3py

2019-05-17 Thread John Bannister
Hi Massimo, I have downloaded latest web3py and same thing is happening. I can see in the console that it is reloading all the apps but for me updates are not happening until I restart the server. I am running web3py in a python3 venv on windows/linux (Ubuntu 18) python 3.6.

[web2py] Re: A question about ajax function (passing a string parameter over)

2019-05-17 Thread Vlad
I'll try to simplify it, hoping that I'll figure it out, but it's really very puzzling: this works perfect: var encodedDescription = $("#CurrentCartDescription").text(); $("#CurrentCartDescription").html(atob(encodedDescription)); it decodes it back just exactly from what it

[web2py] Re: A question about ajax function (passing a string parameter over)

2019-05-17 Thread Vlad
It works almost, but not 100% :) with encodeURIComponent : abc def (test) comes back as abc_def__test_ a;slkdjf;l -239i4-29i23la'skfj(()))9012? <>,. = comes back as a_slkdjf_l_-239i4-29i23la_skfj_9012__.__= This wouldn't help me, because I want it to be exactly whatever they

RE: [web2py] Re: new DBAPI in pydal for both web2py and web3py

2019-05-17 Thread John Bannister
How about Despresso (for database express O ). J From: web2py@googlegroups.com [mailto:web2py@googlegroups.com] On Behalf Of Massimo Di Pierro Sent: 17 May 2019 17:43 To: web2py-users Subject: [web2py] Re: new DBAPI in pydal for both web2py and web3py I am embarrassed I have forgotten

[web2py] Re: I can not import module in app

2019-05-17 Thread Leonel Câmara
Inside the application which has the module in its modules folder all you need is "import mytest" -- 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

[web2py] Re: new DBAPI in pydal for both web2py and web3py

2019-05-17 Thread Massimo Di Pierro
I am embarrassed I have forgotten all about latin. :-( The italian equivalent would be "accesso" but does not sound nice to me. I am not too concerned about naming conflicts as long as the name is simple to remember and conveys what it does. After all it is the name of a file and a class, not a

[web2py] Re: SQL warning

2019-05-17 Thread Joel Samuelsson
Hi, Thanks for your input Dave. It is indeed from Auth. If I change lines (1867-1869) in gluon/tools.py: Field('registration_id', length=512, writable=False, readable=False, default='', label=self.messages.label_registration_id), to Field('registration_id', length=512, writable=False,

[web2py] Using parse_as_rest: problem with cross joins?

2019-05-17 Thread David Orme
Hi, I'm looking at parse_as_rest() to provide an API and can't get it to work as expected. I have two table: datasets and fields, with a 1 to N relationship and I want to create an API that returns datasets that have a field name matching a pattern so (using the tuple version of patterns to

Re: [web2py] Re: Web3py

2019-05-17 Thread Massimo Di Pierro
I fixed the database locking problem. missing db.commit() Editing apps and reloading forks for me. Please try again and let's try figure out why does not work for you. It is intentionally reloading all apps but this can easily be changed. I will change it. Massimo On Friday, 17 May 2019

Re: [web2py] Re: new DBAPI in pydal for both web2py and web3py

2019-05-17 Thread Carlos Costa
I liked it, sounds Italian. Sometimes when you have a restriction it inspires creativity. For example, if we would have a rule to give only Italian (Massimo origin is the reason here) names to Web2py stuff (web2py itself included) we could come up with more natural and interesting names. Like

[web2py] Re: A question about ajax function (passing a string parameter over)

2019-05-17 Thread Anthony
On Thursday, May 16, 2019 at 3:43:58 PM UTC-4, Vlad wrote: > > I have the following javascript in the view: > > var id = $('#CurrentCartId').text(); > var description = $(this).text(); > var url='{{=URL('cart','description')}}'; > url += '/' + id +

Re: [web2py] Re: new DBAPI in pydal for both web2py and web3py

2019-05-17 Thread António Ramos
there we go again about naming something ... Jut call it Gluino! to glue data to the app.. Em sex, 17 de mai de 2019 às 11:37, villas escreveu: > acquisAPI > > acquis Shortened from acquis communautaire: French acquis (“that which has > been acquired or obtained”) + communautaire (“of the

[web2py] Re: !web2py, but i'm asking someone's help with aws-sdk-js.

2019-05-17 Thread lucas
actually Dave S, your indirect answer led me to a place of where not to go at all, which was the server-side node.js. believe it or not. because it led me to a place where i actually needed to be. and i conjured the final code after about 44 hours of toil. it works freaking great, pure

Re: [web2py] Re: A question about ajax function (passing a string parameter over)

2019-05-17 Thread villas
Make sure that your jQuery loading and browser up to date... Simplify the page to something like below. Get that working. Add back your complexity afterwards: Q29va2llcyBvbmU= $(".EncodedDescriptionField").each( function(index, element ){ var hereWeAre = $(this).text();

Re: [web2py] Re: A question about ajax function (passing a string parameter over)

2019-05-17 Thread Eliezer (Vlad) Tseytkin
Typo: I meant atob On Fri, May 17, 2019, 8:21 AM Eliezer (Vlad) Tseytkin < westgate6...@gmail.com> wrote: > Those are span elements inside inside in a table. > > But the values themselves are fine - I can print them out, and they are > correct. It's only a problem when I try to apply btoa

[web2py] Re: Answer from database empty list, list with tuple

2019-05-17 Thread villas
1. Note that this will fail if no email var is passed. request.vars.email.strip() 2. For the second query, print the SQL to the console using ._select() Are you getting the SQL you expected? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

Re: [web2py] Re: A question about ajax function (passing a string parameter over)

2019-05-17 Thread Eliezer (Vlad) Tseytkin
Those are span elements inside inside in a table. But the values themselves are fine - I can print them out, and they are correct. It's only a problem when I try to apply btoa function to it. On Fri, May 17, 2019, 8:09 AM villas wrote: > Hmm, not sure. > Are you getting the values from

[web2py] Re: A question about ajax function (passing a string parameter over)

2019-05-17 Thread villas
Hmm, not sure. Are you getting the values from elements? Try: var hereWeAre = $(this).val(); On Friday, 17 May 2019 12:13:03 UTC+1, Vlad wrote: > > I thought so and tried: > > $(".EncodedDescriptionField").each( function(index, element ){ > var hereWeAre =

[web2py] Re: updating menu without reloading the page

2019-05-17 Thread villas
Wow thanks Vlad! I didn't hope for such a full explanation, but this will be appreciated by anyone following the thread. All the best. On Thursday, 16 May 2019 17:04:13 UTC+1, Vlad wrote: > > Yes sure: > > My issue was the menu item with "Cart (X)" menu item where X indicated how > many

[web2py] Re: A question about ajax function (passing a string parameter over)

2019-05-17 Thread Vlad
I thought so and tried: $(".EncodedDescriptionField").each( function(index, element ){ var hereWeAre = $(this).text(); var decodedString = atob(hereWeAre); console.error(hereWeAre); console.error(decodedString); });

[web2py] Re: A question about ajax function (passing a string parameter over)

2019-05-17 Thread villas
Maybe you need to iterate through the class elements. See this: https://stackoverflow.com/questions/4735342/jquery-to-loop-through-elements-with-the-same-class On Thursday, 16 May 2019 23:58:28 UTC+1, Vlad wrote: > > Just to clarify: > > the following works perfect for one field by ID

[web2py] Re: new DBAPI in pydal for both web2py and web3py

2019-05-17 Thread villas
acquisAPI acquis Shortened from acquis communautaire: French acquis (“that which has been acquired or obtained”) + communautaire (“of the community”). On Thursday, 16 May 2019 07:33:21 UTC+1, Massimo Di Pierro wrote: > > how about we simply call it "Access"? > > On Wednesday, 15 May 2019

[web2py] Re: Answer from database empty list, list with tuple

2019-05-17 Thread Константин Комков
Version 2 can return -- 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 received this message because you are subscribed to the Google Groups

[web2py] Answer from database empty list, list with tuple

2019-05-17 Thread Константин Комков
I want to have answer which contain *id* or *None*, but now in my query I have answer as empty list or list with tuple. It's my query (version 1): row = db_xml.executesql("SELECT FIRST 1 CASE WHEN V_CODE={0} THEN ID ELSE NULL END AS ID FROM ABIT_VALIDATION_CODES WHERE A_EMAIL='{1}' AND

[web2py] Re: new DBAPI in pydal for both web2py and web3py

2019-05-17 Thread Val K
Maybe 'Gate' or 'Gateway' -- 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 received this message because you are subscribed to the Google Groups

[web2py] Re: new DBAPI in pydal for both web2py and web3py

2019-05-17 Thread Daniel Guilhermino
I feel like noob ... I suggested because Aditus in Latin is "Access". And my google search (Brazilian) don't show anything like this on 2 firsts pages. :( mirimQL mirim = small in "Tupi language" *Old Tupi* or *classical Tupi* is an extinct Tupian language

[web2py] Re: Web3py

2019-05-17 Thread 黄祥
test 'reload apps' on http://localhost:8000/_dashboard return an error on terminal and also on browser http://localhost:8000/_dashboard when click superheroes installed applications [FAILED] loading superheroes Traceback (most recent call last): File

RE: [web2py] Re: Web3py

2019-05-17 Thread John Bannister
Hi Massimo, I have tried that but it has no effect. It seems to be doing something for a while but the only way I can get changes to appear is to restart the server. Basically what I did was to copy and rename the helloworld action a few times so helloworld1 …….helloworld7 (all in same

[web2py] I can not import module in app

2019-05-17 Thread Константин Комков
I want import module. I create module mytest like in book, but after import I heve error. I tried to import mytest in another app and it work. What is reason of it? I tried import module like that : from applications. application.modules import mytest but error the same. Error ticket for

[web2py] Re: new DBAPI in pydal for both web2py and web3py

2019-05-17 Thread Massimo Di Pierro
I feel like I am missing something. This is the first entry from google: https://en.wikipedia.org/wiki/Aditus_to_mastoid_antrum On Thursday, 16 May 2019 22:25:58 UTC-7, Daniel Guilhermino wrote: > > My 20 cents... Why not Aditus? > > Em terça-feira, 14 de maio de 2019 03:18:42 UTC-3, Massimo Di

Re: [web2py] Web3Py equivalent of SQLFORM.grid

2019-05-17 Thread Massimo Di Pierro
Please consider that it is not finished. As soon as done I will write some documentation. But basically you include utils.js, vue.min.js, axios.min.js, components/mtable.js and the you embed it as a vue component. On Thursday, 16 May 2019 08:31:23 UTC-7, John Bannister wrote: > > Hi

[web2py] Re: Web3py

2019-05-17 Thread Massimo Di Pierro
yes. There is a button on the top/right of the dashboard "reload apps" On Thursday, 16 May 2019 08:15:44 UTC-7, John Bannister wrote: > > Hi All, > > Had a first real 'play' with web3py' today and have a few questions the > biggest of which I am hoping the gurus will be able to answer:- > > 1: