Re: [web2py] Re: Current.db

2018-10-12 Thread Lovedie JC
I just discovered that. Thanks for the help. But will let you know in case it appears again. On Sat, 13 Oct 2018, 00:42 Yoel Benitez Fonseca wrote: > h! > > > On Oct 12 2018, at 5:33 pm, Lovedie JC wrote: > > > Here is the origin of the problem. > I have two apps, I noticed that one function

Re: [web2py] Re: Current.db

2018-10-12 Thread Yoel Benitez Fonseca
h! On Oct 12 2018, at 5:33 pm, Lovedie JC wrote: > > Here is the origin of the problem. > I have two apps, I noticed that one function was using data from a db of > another app. When I changed that, to pick data from the apps db that's when > the error started. when using back the previous db

Re: [web2py] Re: Current.db

2018-10-12 Thread Lovedie JC
Here is the origin of the problem. I have two apps, I noticed that one function was using data from a db of another app. When I changed that, to pick data from the apps db that's when the error started. when using back the previous db the error is not there. I have tried to make several changes

Re: [web2py] Re: Current.db

2018-10-12 Thread Yoel Benitez Fonseca
Sorry Anthony but it seems to that the original question was about accesing db trough current, with is not set in current by default so my answer is about that's. You need to set current.db in a models an in a module: from gluon import current ... def my_module_resident_func(): db = current.db

[web2py] Re: SQLFORM element(s) (delete or remove)

2018-10-12 Thread Anthony
http://web2py.com/books/default/chapter/29/05/the-views#Replacing-elements On Friday, October 12, 2018 at 12:53:39 AM UTC-4, lucas wrote: > > hello one and all, > > the API is tough to navigate. so, i'll ask. SQLFORM element and elements > is very powerful. along with update, insert, and

[web2py] Re: Using CRYPT()

2018-10-12 Thread Anthony
> > > if form.process(formname='form',onvalidation=check_agreement).accepted: > #How can I get hash and maybe random salt HERE??? > request.vars.password is the raw data sent from the browser. After form processing, the transformed value will be in form.vars.password. Anthony --

Re: [web2py] Re: Current.db

2018-10-12 Thread Anthony
On Friday, October 12, 2018 at 4:59:07 PM UTC-4, Yoel Benitez Fonseca wrote: > > In a model do, in db.py at the end if u can: > > def _(): > > from gluon import current > > current.db = db > current.auth = auth > > _() > > > Remember's the book says: don't import current into module

[web2py] Re: web2py.test replacement

2018-10-12 Thread mark
https://bitbucket.org/MarkGraves/web2pytest On Friday, October 12, 2018 at 9:40:12 AM UTC-5, Bryan Chance wrote: > > Does anyone know of a web2py.test replacement? The link I see everywhere > is for what looks to be a deleted repo: > https://github.com/viniciusban/web2py.test > > -- Resources:

Re: [web2py] Re: Current.db

2018-10-12 Thread Yoel Benitez Fonseca
In a model do, in db.py at the end if u can: def _(): from gluon import current current.db = db current.auth = auth _() Remember's the book says: don't import current into module level code. On Oct 12 2018, at 12:04 pm, Lovedie JC wrote: > > Yes. > from gluon import * > from gluon import

[web2py] Re: Need to Access Static Images with HTTP

2018-10-12 Thread Dave S
On Friday, October 12, 2018 at 11:57:18 AM UTC-7, Dan Carroll wrote: > > Okay, here is an odd one. I have two systems configured more or less the > same. One is for development and one for production. > > Both servers are configured with ubuntu, nginx, and uwsgi. Configured > identically,

[web2py] Re: Using CRYPT()

2018-10-12 Thread Dave S
On Friday, October 12, 2018 at 3:29:54 AM UTC-7, Константин Комков wrote: Dave S, thank you, I think also. But how can I get hash on server? > my controller: > [...] > if form.process(formname='form',onvalidation=check_agreement).accepted: > #How can I get hash and maybe random salt

[web2py] Re: How to set my menu to hamburger menu for tablet devices when they open my webapp

2018-10-12 Thread Dave S
On Friday, October 12, 2018 at 3:06:58 AM UTC-7, mostwanted wrote: > > Can anyone assist me in figuring out how to set my menu to hamburger menu > for tablet devices when they open my app, mobile devices are able to > achieve that without any problems but its not the case with tablet devices.

Re: [web2py] Help needed with web2py-book app

2018-10-12 Thread Dave S
On Friday, October 12, 2018 at 2:52:44 AM UTC-7, Nico Zanferrari wrote: > > Hi Dave! > > On > https://github.com/web2py/web2py-book/blob/master/controllers/default.py > the session.forget() command is on line 10 - and I suppose it's quite > necessary. > > I wonder if that's for development,

[web2py] Need to Access Static Images with HTTP

2018-10-12 Thread Dan Carroll
Okay, here is an odd one. I have two systems configured more or less the same. One is for development and one for production. Both servers are configured with ubuntu, nginx, and uwsgi. Configured identically, except of course the IP addressing. The development server will return static files

Re: [web2py] Re: Current.db

2018-10-12 Thread Lovedie JC
Yes. from gluon import * from gluon import current, DAL,field On Fri, 12 Oct 2018, 18:58 Leonel Câmara wrote: > Did you import current from gluon before doing that? > > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documentation) > - http://github.com/web2py/web2py (Source

[web2py] Re: Current.db

2018-10-12 Thread Leonel Câmara
Did you import current from gluon before doing that? -- 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: Current.db

2018-10-12 Thread Lovedie JC
I have it (current.db=db) in my model. But still got the error.i even tried to create another table but with the same error. On Fri, 12 Oct 2018, 18:31 Leonel Câmara wrote: > For current.db to work you need to put it there in a model file or > someplace else. You need do do something like

[web2py] Can I do INSERT INTO statement with DAL syntax ?

2018-10-12 Thread icodk
something like : INSERT INTO Customers (CustomerName, City, Country) SELECT SupplierName, City, Country FROM Suppliers WHERE Country=1; -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: Current.db

2018-10-12 Thread Leonel Câmara
For current.db to work you need to put it there in a model file or someplace else. You need do do something like current.db = db in your models. current.globalenv is always populated by web2py when it builds the environment where a controller or scheduler task is processed with the things you

Re: [web2py] web2py.test replacement

2018-10-12 Thread Yoel Benitez Fonseca
I have a local copy of that repository if u are interested. Also i'm working on a mayor project using the test system proposed by @viniciusban in his repository, also with our owm modifications. Sent from Mailspring

[web2py] Re: Scheduler task (defined inside a module) won't run new code even after restarting uWSGI

2018-10-12 Thread Lisandro
Sorry, my bad. I realised that I had to restart scheduler workers, not uWSGI workers. So I restarted the scheduler workers and it worked. Sorry for the bother! El viernes, 12 de octubre de 2018, 12:04:40 (UTC-3), Lisandro escribió: > > I'm facing a weird issue: I have a scheduler task that is

[web2py] Scheduler task (defined inside a module) won't run new code even after restarting uWSGI

2018-10-12 Thread Lisandro
I'm facing a weird issue: I have a scheduler task that is defined inside a module. At the same time, that function calls another function that is defined in **another** module. I had to make some changes to the last module, so I restarted uWSGI, but the task is still running with the old code

[web2py] web2py.test replacement

2018-10-12 Thread Bryan Chance
Does anyone know of a web2py.test replacement? The link I see everywhere is for what looks to be a deleted repo: https://github.com/viniciusban/web2py.test -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Current.db

2018-10-12 Thread Maurice Waka
What is the difference between "db = current.db" and "db = current.globalenv['db']? It seems like 'db = current.db' is not working. After some googling I ended up using the second option, otherwise continuously got error: DAL object has no attribute 'field object' -- Resources: -

[web2py] Re: Using CRYPT()

2018-10-12 Thread Константин Комков
Dave S, thank you, I think also. But how can I get hash on server? my controller: form = FORM( DIV( DIV( LABEL( 'Пароль:', _for='abit_pass', _style='font-weight: 400;' ),

[web2py] How to set my menu to hamburger menu for tablet devices when they open my webapp

2018-10-12 Thread mostwanted
Can anyone assist me in figuring out how to set my menu to hamburger menu for tablet devices when they open my app, mobile devices are able to achieve that without any problems but its not the case with tablet devices. i have been going through the web2py-boostrap3.CSS file hoping to see

Re: [web2py] Help needed with web2py-book app

2018-10-12 Thread Nico Zanferrari
Hi Dave! On https://github.com/web2py/web2py-book/blob/master/controllers/default.py the session.forget() command is on line 10 - and I suppose it's quite necessary. If I change the convert2html function in order to test for import errors: try: from pygments import highlight as

Re: [web2py] Help needed with web2py-book app

2018-10-12 Thread Dave S
On Thursday, October 11, 2018 at 1:29:04 PM UTC-7, Nico Zanferrari wrote: > > Thank you Ben, > > I was looking at the same official page ;-) > It seems that using the io module is the way to go, and it's already used > in pymysql . I'm testing it. > > Nobody has suggestions about the

Re: [web2py] Re: Future of web2py

2018-10-12 Thread António Ramos
Massimo, you said ... *(something we talk about but did not happen)* Is it still going to happen? regards António Em sex, 12 de out de 2018 às 08:32, Massimo Di Pierro < massimo.dipie...@gmail.com> escreveu: > No worries. We never ever ever removed a feature from web2py. We only add. > > If we

[web2py] Re: Using CRYPT()

2018-10-12 Thread Dave S
On Thursday, October 11, 2018 at 11:59:26 PM UTC-7, Константин Комков wrote: > > I thought that after using CRYPT() and pushing submit button I have had > hash in variable request.vars.password, but I received my password. > crypt() runs on the server, AIUI, so the POST would not have the

Re: [web2py] Re: Future of web2py

2018-10-12 Thread Massimo Di Pierro
No worries. We never ever ever removed a feature from web2py. We only add. If we make a new framework (something we talk about but did not happen) we will improve on this feature, not remove it. On Monday, 8 October 2018 03:43:23 UTC-7, Ramos wrote: > > If somebody removes groups and

[web2py] MyRocks in MariaDB - any benefits/possibility to use with DAL?

2018-10-12 Thread Shawn Michaels
Hi, There is stable implementation of MyRocks engine in MariaDB. Could someone share thoughts about that and usability with web2py/DAL? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] How to set up a custom applications folder running web2py with Apache and mod_wsgi?

2018-10-12 Thread Ivan Mikovski
Dear all, I'm updating a legacy project adding web functionality with web2py. The applications folder is not under web2py directory (I can't change that). Running web2py from console, with the option -f worked for me. Now, I need to mount it to an Apache. For that I am using mod_wsgi. The

Re: [web2py] Re: qrcode

2018-10-12 Thread Jorge Luis Hernández Dueñas
Hi, I have the same error, I try to save a qr image and I have tried it in many ways but it keeps giving me error. Please, if you solved it, it would be very helpful for me. El sábado, 23 de julio de 2016, 7:05:49 (UTC-5), isi_jca escribió: > > > Hi!!!. >> >> > When I try to print qrcode image

[web2py] Re: Using CRYPT()

2018-10-12 Thread Константин Комков
I thought that after using CRYPT() and pushing submit button I have had hash in variable request.vars.password, but I received my password. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -