RE: [web2py] Re: Web3py FORM referenced fields

2019-06-12 Thread John Bannister
Hi Massimo, Issue is not the dropdown for referenced fields on an Add rec as that works fine. Issue is when you want to edit a record with a referenced field so form=Form(db.order, record=id) Referenced field is blank (although dropdown is available). All other fields are populated

Re: [web2py] Re: setting up pscycopg2

2019-06-12 Thread Dave S
On Wednesday, June 12, 2019 at 2:29:51 AM UTC-7, Annet wrote: > [...] > On Linux I ran the following code to install psycopg2 > > export PATH=/usr/pgsql-9.1/bin/:$PATH > mkdir -p ~/lib/python2.7 > easy_install-2.7 psycopg2 > > This isn't done as sudo? > As far as I know Web2py will always

Re: [web2py] Re: setting up pscycopg2

2019-06-12 Thread 'Annet' via web2py-users
Hi Dave, I work both on Mac OS X and Linux and have Postgres databases. On Mac OS X I located the pg_config file and added its location to the .bash_profile file: export PATH=/usr/local/bin:$PATH export PATH=$PATH:/Applications/Postgres.app/Contents/Versions/9.3/bin Then I got pip and install

Re: [web2py] Re: setting up pscycopg2

2019-06-11 Thread Dave S
On Tuesday, June 4, 2019 at 3:42:49 PM UTC-7, Dave S wrote: > >>> Is site-packages the wrong location? > >> That's web2py/applications/myapp/site-packages > > No, it's not. It's just web2py/site-packages. > > I see gluon/packages/dal/pydal/drivers.py attempts to import psycopg2. What's the

Re: [web2py] Re: Problem with Import

2019-06-10 Thread Jonathan Clark
I'm not sure I can help you. You have found the problem is to do with importing psycopg2. I have a feeling I had a similar problem and I switched to pg8000 as the driver, and it just worked. pg8000 is not supposed to be reliable though for postgresql. But it worked for me. Good luck, Jonathan On

Re: [web2py] Re: Web3py

2019-06-09 Thread Massimo Di Pierro
please try delete everything in apps/_scaffold/databases/* I was not able to reproduce after I did that On Sunday, 9 June 2019 01:23:08 UTC-7, John Bannister wrote: > > I tried both with and without. Same or very similar result. It is only > complaining about the auth_user_tag table which is de

RE: [web2py] Re: Web3py

2019-06-09 Thread John Bannister
I tried both with and without. Same or very similar result. It is only complaining about the auth_user_tag table which is defined in the auth module. From: web2py@googlegroups.com [mailto:web2py@googlegroups.com] On Behalf Of Massimo Di Pierro Sent: 08 June 2019 07:19 To: web2py-users Subjec

Re: [web2py] Re: web2py managing capacity ?

2019-06-07 Thread Dave S
On Tuesday, June 4, 2019 at 12:00:09 PM UTC-7, Dave S wrote: > > > > On Tuesday, June 4, 2019 at 9:12:24 AM UTC-7, karthikeyan p wrote: >> >> sorry , >> Carlos Costa >> , i typed wrongly ! >> its scalability , i want to know web2py apps scalability ! >> > > Well, that depends on your applicat

Re: [web2py] Re: how safe is it to rely on a value stored as a session variable?

2019-06-07 Thread Eliezer (Vlad) Tseytkin
Thank you! On Fri, Jun 7, 2019, 12:32 PM Anthony wrote: > Users can neither read nor write to the session (even cookie based > sessions, which are encrypted), so it is "safe" in that regard. Of course, > we don't know what your app code is writing to the session -- if you take > user input and w

Re: [web2py] Re: auth.settings.login_next doesn't redirect after login -

2019-06-07 Thread Eliezer (Vlad) Tseytkin
Oops, got it, repeating this mistake second time.. Thank you very much On Fri, Jun 7, 2019, 12:26 PM Anthony wrote: > On Thursday, June 6, 2019 at 3:54:59 PM UTC-4, Vlad wrote: >> >> What could be the reason the following code wouldn't redirect to the >> appropriate URL after login? (still bring

Re: [web2py] Re: How can I generate hash for user password like web2py

2019-06-06 Thread Dave S
On Sunday, June 2, 2019 at 1:47:27 PM UTC-7, Константин Комков wrote: > > All entrant information are checking by operators and if that information > correct entrant can be registrated in personal cabinet. If entrant gived > our information on site, it's work like auth registration form. Entran

Re: [web2py] Re: How to make this code work ...

2019-06-06 Thread Dave S
On Thursday, June 6, 2019 at 5:03:54 AM UTC-7, Ben Duncan wrote: > > Ok, moving it to static makes it work fine. It was in view/default > Any IDEAS on what / why this works this way ? > > Thanks ... > > *Ben Duncan* > DBA / Chief Software Architect > Mississippi State Supreme Court > Electron

Re: [web2py] Re: How to make this code work ...

2019-06-06 Thread Ben Duncan
Ok, moving it to static makes it work fine. It was in view/default Any IDEAS on what / why this works this way ? Thanks ... *Ben Duncan* DBA / Chief Software Architect Mississippi State Supreme Court Electronic Filing Division On Wed, Jun 5, 2019 at 9:51 PM Dave S wrote: > > > On Wednesday, J

Re: [web2py] Re: sqlform grid search widget expression question

2019-06-05 Thread Eliezer (Vlad) Tseytkin
It's a reference field (foreign key) and the pull down has no empty value. It should have (because it can be null), but it doesn't for some reason. On Wed, Jun 5, 2019, 10:44 PM Dave S wrote: > > > On Wednesday, June 5, 2019 at 3:56:56 PM UTC-7, Vlad wrote: >> >> How can I search for None values

Re: [web2py] Re: How to make this code work ...

2019-06-05 Thread Dave S
On Wednesday, June 5, 2019 at 12:47:51 PM UTC-7, Dave S wrote: > > > > On Wednesday, June 5, 2019 at 3:30:46 AM UTC-7, Val K wrote: >> >> Yes, file:// is even another protocol, so using http transport in this >> case is out of all standards. But it should work fine with regular web2py >> app (o

Re: [web2py] Re: How to make this code work ...

2019-06-05 Thread Dave S
On Wednesday, June 5, 2019 at 3:30:46 AM UTC-7, Val K wrote: > > Yes, file:// is even another protocol, so using http transport in this > case is out of all standards. But it should work fine with regular web2py > app (over http) Since I found a way to successfully demonstrate the javascript

Re: [web2py] Re: How to make this code work ...

2019-06-05 Thread Dave S
On Wednesday, June 5, 2019 at 5:54:23 AM UTC-7, Ben Duncan wrote: > > Put some console logs in to see strange ... > > This site makes use of a SHA-1 Certificate; it’s recommended you use > certificates with signature algorithms that use hash functions stronger > than SHA-1. > loadajax

Re: [web2py] Re: How to make this code work ...

2019-06-05 Thread Ben Duncan
Put some console logs in to see strange ... This site makes use of a SHA-1 Certificate; it’s recommended you use certificates with signature algorithms that use hash functions stronger than SHA-1. loadajax In function loaddoc loadajax:14:11

Re: [web2py] Re: How to make this code work ...

2019-06-05 Thread Val K
Yes, file:// is even another protocol, so using http transport in this case is out of all standards. But it should work fine with regular web2py app (over http) -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://c

Re: [web2py] Re: How to make this code work ...

2019-06-05 Thread Dave S
On Tuesday, June 4, 2019 at 10:11:43 PM UTC-7, Val K wrote: > > Try xhttp.withCredentials = true I did. The tricky part is that using a file on the browser's host, the first request is OPTIONS. /dps -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://githu

Re: [web2py] Re: How to make this code work ...

2019-06-04 Thread Val K
Try xhttp.withCredentials = true -- 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

Re: [web2py] Re: How to make this code work ...

2019-06-04 Thread Dave S
$ On Tuesday, June 4, 2019 at 6:00:44 PM UTC-7, Dave S wrote: > > > > On Tuesday, June 4, 2019 at 3:16:12 PM UTC-7, Ben Duncan wrote: >> >> I've been trying to run it ... When you click on the button it does >> nothing >> >> *Ben Duncan* >> DBA / Chief Software Architect >> Mississippi State Sup

Re: [web2py] Re: How to make this code work ...

2019-06-04 Thread Dave S
On Tuesday, June 4, 2019 at 3:16:12 PM UTC-7, Ben Duncan wrote: > > I've been trying to run it ... When you click on the button it does nothing > > *Ben Duncan* > DBA / Chief Software Architect > Mississippi State Supreme Court > Electronic Filing Division > > > When I replace the "ajax-info.tx

Re: [web2py] Re: setting up pscycopg2

2019-06-04 Thread Dave S
On Saturday, June 1, 2019 at 1:41:12 AM UTC-7, Nico Zanferrari wrote: > > Hi Dave, > > I've faced the same problem trying to add psycopg2 on MacOs binaries with > python 2.7. Following some advices, I've resolved it by installing unixodbc > (with brew) before it. > > I hope it helps, > Nico >

Re: [web2py] Re: How to make this code work ...

2019-06-04 Thread Ben Duncan
I've been trying to run it ... When you click on the button it does nothing *Ben Duncan* DBA / Chief Software Architect Mississippi State Supreme Court Electronic Filing Division On Tue, Jun 4, 2019 at 4:35 PM Anthony wrote: > What are you trying to do? That code should work fine in web2py, as

Re: [web2py] Re: web2py managing capacity ?

2019-06-04 Thread Dave S
On Tuesday, June 4, 2019 at 9:12:24 AM UTC-7, karthikeyan p wrote: > > sorry , > Carlos Costa > , i typed wrongly ! > its scalability , i want to know web2py apps scalability ! > Well, that depends on your application (how much work your app does on a request), your front end, and your data

Re: [web2py] Re: web2py managing capacity ?

2019-06-04 Thread karthikeyan p
sorry , Carlos Costa , i typed wrongly ! its scalability , i want to know web2py apps scalability ! On Fri, May 24, 2019 at 8:22 PM Carlos Costa wrote: > sociability? > > Em sex, 24 de mai de 2019 às 05:18, 黄祥 > escreveu: > >> how to use it with postgresql ? >>> >> >> pls set the uri connecti

Re: [web2py] Re: json.loads with cyrillic string

2019-06-04 Thread Константин Комков
Val K, yes, but I get json string from client js. вт, 4 июн. 2019 г., 17:01 Val K : > it is maybe not convenient when storing json as text file, to solve this > you can pass ensure_ascii=False to json.dumps > > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documentation) > - h

Re: [web2py] Re: string vs text db field question

2019-06-04 Thread Eliezer (Vlad) Tseytkin
Everybody is lucky sometimes :) Thank you! On Tue, Jun 4, 2019, 9:12 AM Anthony wrote: > SQLite doesn't make a distinction between string and text nor have a > length limit, so yes, you're just "lucky" at the moment. If you plan to > migrate to something like Postgres, either explicitly set a h

Re: [web2py] Re: How can I generate hash for user password like web2py

2019-06-02 Thread Константин Комков
I think will be 3 entrants in that year вс, 2 июн. 2019 г., 23:47 Константин Комков : > All entrant information are checking by operators and if that information > correct entrant can be registrated in personal cabinet. If entrant gived > our information on site, it's work like auth registrat

Re: [web2py] Re: How can I generate hash for user password like web2py

2019-06-02 Thread Константин Комков
All entrant information are checking by operators and if that information correct entrant can be registrated in personal cabinet. If entrant gived our information on site, it's work like auth registration form. Entrant push your own password and after operators check entrant's info entrant can logi

Re: [web2py] Re: submitting a form from a LOAD component - request.post_vars is empty

2019-06-01 Thread Eliezer (Vlad) Tseytkin
got it, thank you very much ! On Sat, Jun 1, 2019 at 11:20 AM Anthony wrote: > In order for web2py to submit forms inside LOAD components via Ajax, it > must set up its own event handler to "trap" the form submission, so it can > be intercepted -- this is done here: > https://github.com/web2py/w

Re: [web2py] Re: A little suggestion: Create a forum for web3py

2019-06-01 Thread Carlos Cesar Caballero
Good to know!! Slack deleted accounts and blocked the access from Cuba some months ago... Greetings El sábado, 1 de junio de 2019, 0:48:23 (UTC-4), Massimo Di Pierro escribió: > > we will not. Google groups has served us well. We will eventually create > another group but not today. ;-) > > On

Re: [web2py] Re: setting up pscycopg2

2019-06-01 Thread Nico Zanferrari
Hi Dave, I've faced the same problem trying to add psycopg2 on MacOs binaries with python 2.7. Following some advices, I've resolved it by installing unixodbc (with brew) before it. I hope it helps, Nico Il giorno sab 1 giu 2019 alle ore 00:09 Dave S ha scritto: > Help! > > /dps > > On Thursd

Re: [web2py] Re: A little suggestion: Create a forum for web3py

2019-05-31 Thread Massimo Di Pierro
we will not. Google groups has served us well. We will eventually create another group but not today. ;-) On Friday, 31 May 2019 19:57:26 UTC-7, Carlos Cesar Caballero wrote: > > Please no!! we can't use Slack from Cuba. > > Greetings. > > El miércoles, 29 de mayo de 2019, 12:45:50 (UTC-4), Ramos

Re: [web2py] Re: A little suggestion: Create a forum for web3py

2019-05-31 Thread Carlos Cesar Caballero
Please no!! we can't use Slack from Cuba. Greetings. El miércoles, 29 de mayo de 2019, 12:45:50 (UTC-4), Ramos escribió: > > Do we need to reinvent the wheel again ? > why not use for ex... > > https://slack.com > > or many others out there? > > > Em sex, 24 de mai de 2019 às 21:41, Dave S >

Re: [web2py] Re: A little suggestion: Create a forum for web3py

2019-05-31 Thread Carlos Cesar Caballero
Please no!! We can't use Slack from Cuba. Greetings. -- 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

Re: [web2py] Re: submitting a form from a LOAD component - request.post_vars is empty

2019-05-31 Thread Eliezer (Vlad) Tseytkin
Oh, this kind of stuff does work, I've used it in this context; but t's very different in my case: The real problem is that addEventListener clearly does not work from inside of the LOAD component (not sure if it doesn't work at all there, or there is something weird in my case, though I simplifie

Re: [web2py] Re: CSV Dowload

2019-05-30 Thread Kim Cuc
Thanks so much. On Thu, May 30, 2019 at 2:43 AM Quang Lam wrote: > Hi Steve, the code mentioned in the book is only for export to CVS file. > my situation is to download the CVS file stored in the table > > On Wed, May 29, 2019 at 12:01 PM 黄祥 wrote: > >> ref: >> >> http://web2py.com/books/defau

Re: [web2py] Re: How can I generate hash for user password like web2py

2019-05-29 Thread Massimo Di Pierro
It is bad policy for you to generate a password and give it to customers. You should generate a one time token and allow your user to use the token to set his own password using web2py. Web2py automatically stores it encrypted using pbkdf2 + sha512. hashlib is not good enough for passwords be

Re: [web2py] Re: How can I generate hash for user password like web2py

2019-05-29 Thread Константин Комков
I need to generate password and print it for entrant and then take hash from password for writing to database. But that program work on Windows and was written by delphi. Last versions delphi have sha512 and pbkdf2 library but not our. Can you take link by .dll file of the library for use it in del

Re: [web2py] Re: How can I generate hash for user password like web2py

2019-05-29 Thread Carlos Costa
If you can use web2py itself for this task, dot it like this: hash = CRYPT()('text to hash')[0] Em qua, 29 de mai de 2019 às 19:05, João Matos escreveu: > I use Python's hashlib module. It contains pbkdf2. > > segunda-feira, 27 de Maio de 2019 às 12:13:54 UTC+1, Константин Комков > escreveu: >>

Re: [web2py] Re: CSV Dowload

2019-05-29 Thread Quang Lam
Hi Steve, i did not mean to download all table, i just want to download the csv file stored in PerformanceFile. db.define_table( 'Pass_Configuration', Field('PassID', 'reference Pass', label=T('Pass'), requires=IS_NOT_EMPTY()), Fi

Re: [web2py] Re: CSV Dowload

2019-05-29 Thread 黄祥
for download all tables at once try: import StringIO except ImportError: from io import StringIO def download_csv(): stream = StringIO.StringIO() db.export_to_csv_file(stream, delimiter = ',', quotechar = '"',

Re: [web2py] Re: A little suggestion: Create a forum for web3py

2019-05-29 Thread Carlos Costa
I don't agree this is reinvent the wheel. Maybe Slack is reinventing the wheel. Reinvent the wheel, from the Cambridge dictionary: > to waste time trying to create something that someone else has already > created We are having a good experience with chat support on telegram group. There is alre

Re: [web2py] Re: CSV Dowload

2019-05-29 Thread Quang Lam
Hi Dave, yeah, i changed to grid since it has the download function, but when i click on it, it navigates me to the next page with the name of file in URL and 404 not found. do you know how to fix this problem? you can see my code in detail in the other post named CVS file download. Thanks On We

Re: [web2py] Re: CSV Dowload

2019-05-29 Thread Quang Lam
Hi Steve, the code mentioned in the book is only for export to CVS file. my situation is to download the CVS file stored in the table On Wed, May 29, 2019 at 12:01 PM 黄祥 wrote: > ref: > > http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Exporting-and-importing-data >

Re: [web2py] Re: A little suggestion: Create a forum for web3py

2019-05-29 Thread António Ramos
Do we need to reinvent the wheel again ? why not use for ex... https://slack.com or many others out there? Em sex, 24 de mai de 2019 às 21:41, Dave S escreveu: > > > On Friday, May 24, 2019 at 10:14:24 AM UTC-7, Ari Lion BR Sp wrote: >> >> In this while, please join us on our Telegram Group.

Re: [web2py] Re: GAE Task Queue no longer passes payload to web2py function

2019-05-28 Thread Carl Hunter Roach
Thanks Dave. I’m thinking it must be something of that order too. Time to rebuild this project’s yank file. Carl Hunter Roach Bisham Barn Owl Group Middle Thames Conservation Trust Runnymede Ringing Group Founder, Midnight 30 Ltd midnight30.com Makers of Great Careers __

Re: [web2py] Re: Stripe Elements don't display properly - because of some security issue in Web2py - (CSP?)

2019-05-27 Thread Eliezer (Vlad) Tseytkin
Oh, I am not using web2py stripe. I installed stripe stripe and use it directly - need some more advanced features. On Mon, May 27, 2019, 12:21 PM Massimo Di Pierro wrote: > Where is that string? . It > is not in web2py/gluon/contrib/stripe.py Are you using an old stripe.js > file that needs to

Re: [web2py] Re: Web2py: Update table content after submit action

2019-05-27 Thread Dave S
On Sunday, May 26, 2019 at 4:44:06 AM UTC-7, Lovedie JC wrote: > > Hi Dave. I have struggled with this for long but never got a good answer. > Do you have an example where in the view page: > {{=form}} > in the primary page is used but the page is not refreshing > > No. If your page is primar

RE: [web2py] Re: Web2py: Update table content after submit action

2019-05-26 Thread John Bannister
@googlegroups.com] On Behalf Of Lovedie JC Sent: 26 May 2019 14:00 To: web2py@googlegroups.com Subject: Re: [web2py] Re: Web2py: Update table content after submit action I tried with www.web2py.com/AlterEgo/default/show/252 I have to keep refreshing the page for the form to reappear. On Sun

Re: [web2py] Re: Web2py: Update table content after submit action

2019-05-26 Thread Lovedie JC
I tried with www.web2py.com/AlterEgo/default/show/252 I have to keep refreshing the page for the form to reappear. On Sun, 26 May 2019, 14:43 Lovedie JC wrote: > Hi Dave. I have struggled with this for long but never got a good answer. > Do you have an example where in the view page: > {{=form}

Re: [web2py] Re: Web2py: Update table content after submit action

2019-05-26 Thread Lovedie JC
Hi Dave. I have struggled with this for long but never got a good answer. Do you have an example where in the view page: {{=form}} in the primary page is used but the page is not refreshing On Sun, 26 May 2019, 11:16 Dave S wrote: > > > On Saturday, May 25, 2019 at 6:59:44 PM UTC-7, Cristina Sig

Re: [web2py] Re: Scheduler is Not Running

2019-05-24 Thread Dave S
On Friday, May 24, 2019 at 1:39:52 PM UTC-7, Suhas Jadhav wrote: > > HI Dave, > > How do I make hcstar as a task. What is wrong in my code? > > Thanks, > Suhas > > The LOAD() helper is meant to be used in a view. It isn't a useful tool in a task. A task has no client, and no user interface.

Re: [web2py] Re: Scheduler is Not Running

2019-05-24 Thread Suhas Jadhav
HI Dave, How do I make hcstar as a task. What is wrong in my code? Thanks, Suhas On Fri, May 24, 2019 at 1:25 PM Dave S wrote: > > > On Friday, May 24, 2019 at 12:05:31 AM UTC-7, Suhas Jadhav wrote: >> >> Hi, >> >> I have following code >> >> def fun1: >> do something >> returns local

Re: [web2py] Re: web2py managing capacity ?

2019-05-24 Thread karthikeyan p
Thanks for reply ; i will try this ! On Fri, 24 May 2019 at 8:22 PM, Carlos Costa wrote: > sociability? > > Em sex, 24 de mai de 2019 às 05:18, 黄祥 > escreveu: > >> how to use it with postgresql ? >>> >> >> pls set the uri connection first >> *e.g. private/appconfig.ini* >> uri = postgres://post

Re: [web2py] Re: web2py managing capacity ?

2019-05-24 Thread Carlos Costa
sociability? Em sex, 24 de mai de 2019 às 05:18, 黄祥 escreveu: > how to use it with postgresql ? >> > > pls set the uri connection first > *e.g. private/appconfig.ini* > uri = postgres://postgres:password@localhost/database_name > > *ref:* > > http://web2py.com/books/default/chapter/29/06/the-dat

Re: [web2py] Re: accessing the name of post vars

2019-05-24 Thread 黄祥
> > I want to access the posting variable name not is value . Is there any way > ? > there should be any way for those who seeks *pls try (untested)* dict_post_vars = request.post_vars dict_post_vars.keys() *ref:* http://web2py.com/books/default/chapter/29/02/the-python-language#dict best rega

Re: [web2py] Re: accessing the name of post vars

2019-05-24 Thread karthikeyan p
Hi Thanks for reply. I want to access the posting variable name not is value . Is there any way ? On Fri, 24 May 2019 at 1:45 PM, 黄祥 wrote: > www.example.com/welcome/default/index?sum >> >> how to get "sum" in controller ?? >> > > did request.vars not work ? > ref: > http://web2py.com/books/de

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

2019-05-23 Thread Christian Varas
I'm facing the same issue, did you already found the solution? Btw, I'm running web2py in my android phone, maybe for me is quite different... Cheers. Chris. El jue., 23 de may. de 2019 07:03, Константин Комков escribió: > Maybe it info can help? > Error snapshot [image: help] >

Re: [web2py] Re: Using a recursive select but encountered a broken reference

2019-05-22 Thread Carlos Cesar Caballero Díaz
No, I have just found the issue, I am using record versioning in tables, and the child record was removed, this does not trigered the cascade, so, the parent record was not removed and the recursive select was failing when tries to access to a "deleted" record. Greetings. El 22/5/19 a las 11:

Re: [web2py] Re: SQL ALL & ANY operators - ?

2019-05-22 Thread Eliezer (Vlad) Tseytkin
Yeah, I was just hoping for some extra convenience :) Thank you! On Wed, May 22, 2019, 11:59 AM Leonel Câmara wrote: > No. But you can use belongs to do the same thing. > > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documentation) > - http://github.com/web2py/web2py (Sourc

Re: [web2py] Re: SQL ALL & ANY operators - ?

2019-05-22 Thread Eliezer (Vlad) Tseytkin
Oh, I was asking about these: https://www.w3schools.com/sql/sql_any_all.asp On Wed, May 22, 2019, 9:15 AM Константин Комков wrote: > I don't know about ANY, but it was told about ALL > http://www.web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#_lastsql > > -- > Resources:

Re: [web2py] Re: javascript from ajax with :eval question

2019-05-21 Thread Eliezer (Vlad) Tseytkin
Aaahhh got it Thank you very much!! On Tue, May 21, 2019, 7:14 PM Junior Phanter wrote: > # controller return javascript(Jquery) to eval > def echo: > import json > return "$('#target').html(%s)" %(json.dumps(DIV("Hello", > STRONG("world"), "Escape this?").xml())) > > #view > > get from

Re: [web2py] Re: javascript from ajax with :eval question

2019-05-21 Thread Junior Phanter
# controller return javascript(Jquery) to eval def echo: import json return "$('#target').html(%s)" %(json.dumps(DIV("Hello", STRONG("world"), "Escape this?").xml())) #view get from echo $("#your_button").on("click", function(){ url_ajax = "{{=URL("your_controler", "echo")}}" aja

Re: [web2py] Re: javascript from ajax with :eval question

2019-05-21 Thread Eliezer (Vlad) Tseytkin
I am very familiar with controllers/views/helpers the way you just specified, but it doesn't help me because here is my context: I am using ajax function from JavaScript, as a response to a certain event on the page. This ajax is called with :eval option which allows me to construct actual JavaScri

Re: [web2py] Re: javascript from ajax with :eval question

2019-05-21 Thread Eliezer (Vlad) Tseytkin
Could you please clarify: You mentioned {{=json.dumps()}} which looks like code executed in Python. But in "result+=" I am constructing an expression which is actually executed in JavaScript. Did you mistype or I'm missing something? On Tue, May 21, 2019, 5:59 PM Junior Phanter wrote: > resulta

Re: [web2py] Re: javascript from ajax with :eval question

2019-05-21 Thread Junior Phanter
resultado + = {{=json.dumps(DIV().xml())}} Em ter, 21 de mai de 2019 às 13:41, Vlad escreveu: > ALMOST :) > > result += ASSIGNJS(cart=cart) > result += "$('#Debug_Discount').append(''+cart+'');" > > this comes out as [object Object] > > But generated Javascript (as far as the object's c

Re: [web2py] Re: Rows class constructor question

2019-05-21 Thread Eliezer (Vlad) Tseytkin
Got it, Thank you very much! On Tue, May 21, 2019, 2:09 PM Leonel Câmara wrote: > It basically has to do with python namespaces. You did not import Rows > into your current namespace. The definition is there in the context where > the select rows were created but in your namespace you could have

Re: [web2py] Re: Rows class constructor question

2019-05-21 Thread Eliezer (Vlad) Tseytkin
Oops, I thought that if DAL is used extensively and all works already, all the proper classes are already imported by the environment (otherwise how can I run queries and do other db-related stuff without importing those classes explicitly??) How can rows=db.select work and return 'rows', which is

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

2019-05-20 Thread Dave S
On Saturday, May 18, 2019 at 7:05:07 AM UTC-7, Константин Комков wrote: > > Yes it have, but that file is empty > > Empty is ok, but the file is required. /dps > сб, 18 мая 2019 г., 3:38 Dave S >: > >> >> >> On Friday, May 17, 2019 at 2:49:45 PM UTC-7, Константин Комков wrote: >>> >>> Check l

Re: [web2py] Re: Web3py

2019-05-19 Thread 黄祥
in latest commit (116) for reload fixed: - edit, add and delete function on controllers take effects after hit reload button - route for is refreshed after hit reload button (last reported dissapear in some webapp) btw, the button said 'Reaload Apps' is it intention or correct one is 'Reload

Re: [web2py] Re: Redis and Python3?

2019-05-19 Thread Stéphane Krikorian
Thanks for your feedback Jim. Since there are known problems with python-redis3 i force python-redis2 (2.10.6) I tried your suggestion but it fails if 'unique_key' in self and rtn['unique_key'] == self.unique_key: TypeError: argument of type 'MockQuery' is not iterable Did anyone succeed in run

Re: [web2py] Re: Web3py

2019-05-19 Thread Massimo Di Pierro
right we should not be able to edit those. Will fix. On Sunday, 19 May 2019 03:49:22 UTC-7, 黄祥 wrote: > > tested latest commit (115) about recent tickets > - recent tickets can be deleted but when refresh the browser, > http://localhost:8000/_dashboard it will appears again > - recent tickets can

Re: [web2py] Re: Web3py

2019-05-19 Thread Massimo Di Pierro
db.commit() is missing. fixing it later today. On Sunday, 19 May 2019 03:56:19 UTC-7, 黄祥 wrote: > > after hit 'reload' affect the '_dashboard', when do crud for 'recent > tickets' (before hit 'reload', no error occured on terminal) > [OK] reloaded _dashboard > [OK] reloaded _scaffold >

Re: [web2py] Re: Web3py

2019-05-19 Thread Massimo Di Pierro
ok you are right. reloader it broken. Please try the latest version I posted. I dicthed reloader but we may have some side effects. On Sunday, 19 May 2019 02:38:07 UTC-7, John Bannister wrote: > > Hi Guys, > > Couple of things. > > 1: I added a print('Dependancies %s ' % reloader.get_dependencie

Re: [web2py] Re: Web3py

2019-05-19 Thread 黄祥
after hit 'reload' affect the '_dashboard', when do crud for 'recent tickets' (before hit 'reload', no error occured on terminal) [OK] reloaded _dashboard [OK] reloaded _scaffold [OK] reloaded examples [OK] reloaded myapp [OK] reloaded superheroes [OK] reloaded todo E

Re: [web2py] Re: Web3py

2019-05-19 Thread 黄祥
tested latest commit (115) about recent tickets - recent tickets can be deleted but when refresh the browser, http://localhost:8000/_dashboard it will appears again - recent tickets can be edited, not sure why the ticket can be edited ? - when click create, it show forms, but can't be saved, not s

Re: [web2py] Re: Web3py

2019-05-19 Thread John Bannister
Just an update to the below. It seems that the from . import 'whatever' is where the issue is with the reloader as if I do for example import os or import datetime in the __init__.py they both show up in the list of dependencies. Anything with a from . import 'whatever' just lists the apps/my

Re: [web2py] Re: Web3py

2019-05-19 Thread John Bannister
Hi Guys, Couple of things. 1: I added a print('Dependancies %s ' % reloader.get_dependencies(module)) just before the output to console in web3py/core.py. Here is the output (not formatted):- Dashboard is at: http://127.0.0.1:8000/_dashboard [ ] loading examples ... Dependancies None [A[OK]

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

2019-05-18 Thread Massimo Di Pierro
John Bannister wrote: >>>> >>>> As you are da man I would suggest DaQL .. DALQL is a bit of a mouth >>>> full J >>>> >>>> >>>> >>>> *From:* web...@googlegroups.com [mailto:web...@googlegroups.com] *

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

2019-05-18 Thread Vlad
Okay, done :) (Assuming that Python code in {{...}} can't access anything from Javascript on the page - and here encode URI came into play, as per your earlier advice) var id = $('#CurrentCartId').text(); var description = $(this).text(); var url='{{=URL('car

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

2019-05-18 Thread Vlad
Oops, I still don't know how to achieve it. Here is why: This is from the javascript code on the page: var description = $(this).text(); var url='{{=URL('cart','description'),args=[id],vars=[dict(description=description)]}}'; So, the variable description belongs to jav

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

2019-05-18 Thread Eliezer (Vlad) Tseytkin
Here is a test I've just run: def test(): url = URL('cart','test2',args=['a b c 1 3 2 $ % ( ) !'],vars={'oops':'1 3 5 a s i t ! @ # $ %'}) redirect(url) def test2(): str1 = request.args[0] str2 = request.vars['oops'] return locals() Here is what it displays as a result: {{

Re: [web2py] Re: Web3py

2019-05-18 Thread 黄祥
understood, my bad, just test it n report it what think related with the problem @massimo should this thing address an issue in github, so that you can focus release the first version of web3py ? best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

Re: [web2py] Re: Web3py

2019-05-18 Thread Massimo Di Pierro
I do not think this helps. This would conflict with the fact web3py internally imports reloader. On Saturday, 18 May 2019 05:43:22 UTC-7, 黄祥 wrote: > > already checked : https://pypi.org/project/reload > did you test : > reload ./web3py-start apps > ? > > want to learning about reload, but not su

Re: [web2py] Re: Web3py

2019-05-18 Thread Massimo Di Pierro
As mentioned before. Do not use the bottle built-in reloader. It is for a different use case. Also the reloader is not meant to with with gunicorn (because multiprocess). only this should work: bottle.run(server='tornado', host=host, port=int(port)) On Saturday, 18 May 2019 04:49:41 UTC-7, 黄祥

Re: [web2py] Re: Web3py

2019-05-18 Thread Massimo Di Pierro
Wait. You should not change that. Web3py does not uses the bottle bult-in reloader. You should NOT have run(... reloader=True) I know that does not work well because of the order of imports. Also reloader is not supposed to work if you set --number_workers. Could that be the problem? -- Res

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

2019-05-18 Thread Marco Mansilla
This one sounds good to me, since we already have stupid.css El sáb., 18 de may. de 2019 09:51, 黄祥 escribió: > restQL sounds OK. Very generic, but it does what it says on the tin. >> What about stupidQL? :) ok just kidding! >> > > like the idea, it can read as : > restQL = restkill > stupidQ

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

2019-05-18 Thread Константин Комков
Yes it have, but that file is empty сб, 18 мая 2019 г., 3:38 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 mod

Re: [web2py] Re: Web3py

2019-05-18 Thread John Bannister
No I initally tried from web3py folder to import apps.myapp.controllers.py but paths are relative and globals like evrirnment/gloabls like 'WEB3PY_APPS_FOLDER' are not available in the shell. (also tried from apps and myapp folder but same). Probably need to write a little script. So .. I liter

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

2019-05-18 Thread 黄祥
> > restQL sounds OK. Very generic, but it does what it says on the tin. > What about stupidQL? :) ok just kidding! > like the idea, it can read as : restQL = restkill stupidQL = stupidkill just my imagination by cranberries best regards, stifan -- Resources: - http://web2py.com - http://

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

2019-05-18 Thread Carlos Costa
;> >>> >>> *From:* web...@googlegroups.com [mailto:web...@googlegroups.com] *On >>> Behalf Of *Massimiliano >>> *Sent:* 17 May 2019 18:56 >>> *To:* web...@googlegroups.com >>> *Subject:* Re: [web2py] Re: new DBAPI in pydal for both web2py and >>&g

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

2019-05-18 Thread villas
are da man I would suggest DaQL .. DALQL is a bit of a mouth full >>> J >>> >>> >>> >>> *From:* web...@googlegroups.com [mailto:web...@googlegroups.com] *On >>> Behalf Of *Massimiliano >>> *Sent:* 17 May 2019 18:56 >&

Re: [web2py] Re: Web3py

2019-05-18 Thread 黄祥
already checked : https://pypi.org/project/reload did you test : reload ./web3py-start apps ? want to learning about reload, but not sure how to do it best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code)

Re: [web2py] Re: Web3py

2019-05-18 Thread John Bannister
Hi Stifan, I basically followed the example on the PyPi site which works fine. NB I did not manage to reload the modules in apps/myapp manually (from shell). Have not had too much time today to get into it deeply as have other commitments. I did however try to force the load_app to load as opp

Re: [web2py] Re: Web3py

2019-05-18 Thread 黄祥
test reload apps with gunicorn server and reloader=True, can run at first, but when hit 'reload apps' it return an error on terminal *web3py/web3py/core.py* bottle.run(server='gunicorn', host=host, port=int(port), reloader=True) [2019-05-18 18:43:48 +0700] [47687] [INFO] Starting gunicorn 19.9.0

Re: [web2py] Re: Web3py

2019-05-18 Thread 黄祥
> > What OS are you testing on? > mac, linux via docker (ubuntu, debian, centos or fedora) btw, seems not related with os, like root cause is in the web server module (parameter to run web server perhaps (not sure just guess) ), see previous message best regards, stifan -- Resources: - htt

Re: [web2py] Re: Web3py

2019-05-18 Thread 黄祥
*web3py/web3py/core.py* tried bottle.run(server='tornado', host=host, port=int(port), reloader=True) and bottle.run(host=host, port=int(port), reloader=True) got same result, edit and add new function, routes for not work tested work for edit and add new function (but still routes for still no

<    3   4   5   6   7   8   9   10   11   12   >