Re: [web2py] No module named error

2020-07-17 Thread patito feo
Hi,


__init__.py file in ./modules
moduloname.py file in ./modules

But the module still not loade. An error is pop in the web-ide. 



Thanks,



El lunes, 22 de junio de 2020, 14:33:28 (UTC-5), Dave S escribió:
>
>
>
> On Monday, June 22, 2020 at 5:13:46 AM UTC-7, patito feo wrote:
>>
>> Hi,
>>
>> I have done every recommended guide iv seen. Same error.
>>
>> Every time i saved the .py module file same message shows on top of the 
>> editor.
>>
>>  
> That's the editor/IDE shipped with web2py?  (When you save a file, it 
> tries to load the file to check for syntax errors)
>
> Below you refer to "/modules".  Please clarify if you mean "*.*/modules" 
> relative 
> to the application directory, or some other location.
>
> In the IDE, a file in "*.*/modules" would show up under "Modules" in the 
> files sidebar.
>
> /dps
>
>
>
>> Thanks in advance,
>>
>>
>> El domingo, 21 de junio de 2020, 11:46:39 (UTC-5), Ramos escribió:
>>>
>>> check here
>>>
>>> https://stackoverflow.com/questions/4657484/how-can-i-use-modules-in-web2py
>>>  
>>>
>>>  
>>>
>>> Em sáb., 20 de jun. de 2020 às 21:14, patito feo  
>>> escreveu:
>>>
>>>> Hi,
>>>>
>>>> Please define "all ok"
>>>>
>>>> __init__.py file in /modules
>>>> .py file in /modules
>>>>
>>>>
>>>> Thnx for your help!
>>>>
>>>>
>>>>
>>>>
>>>> El sábado, 13 de junio de 2020, 18:45:39 (UTC-5), Ramos escribió:
>>>>>
>>>>> if all is ok, restart web2py
>>>>>
>>>>> Em dom., 14 de jun. de 2020 às 00:35, patito feo  
>>>>> escreveu:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> Im trying to use a module file inside /modules/ folder but keep 
>>>>>> getting this error.
>>>>>>
>>>>>>
>>>>>> failed to reload module because:
>>>>>>
>>>>>> ImportError('No module named mdplenus.modules.test',)
>>>>>>
>>>>>> -- 
>>>>>> 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-users" group.
>>>>>> To unsubscribe from this group and stop receiving emails from it, 
>>>>>> send an email to web...@googlegroups.com.
>>>>>> To view this discussion on the web visit 
>>>>>> https://groups.google.com/d/msgid/web2py/ba92fb90-96da-48a1-8130-b12a0256bb84o%40googlegroups.com
>>>>>>  
>>>>>> <https://groups.google.com/d/msgid/web2py/ba92fb90-96da-48a1-8130-b12a0256bb84o%40googlegroups.com?utm_medium=email_source=footer>
>>>>>> .
>>>>>>
>>>>> -- 
>>>> 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-users" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send 
>>>> an email to web...@googlegroups.com.
>>>> To view this discussion on the web visit 
>>>> https://groups.google.com/d/msgid/web2py/64e635de-af0b-4184-8ae5-d887eb52e346o%40googlegroups.com
>>>>  
>>>> <https://groups.google.com/d/msgid/web2py/64e635de-af0b-4184-8ae5-d887eb52e346o%40googlegroups.com?utm_medium=email_source=footer>
>>>> .
>>>>
>>>

-- 
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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/a5927d67-e331-4700-8c38-905c8430f5a2o%40googlegroups.com.


Re: [web2py] No module named error

2020-06-22 Thread patito feo
Hi,

I have done every recommended guide iv seen. Same error.

Every time i saved the .py module file same message shows on top of the 
editor.



Thanks in advance,


El domingo, 21 de junio de 2020, 11:46:39 (UTC-5), Ramos escribió:
>
> check here
> https://stackoverflow.com/questions/4657484/how-can-i-use-modules-in-web2py
>  
>
>  
>
> Em sáb., 20 de jun. de 2020 às 21:14, patito feo  > escreveu:
>
>> Hi,
>>
>> Please define "all ok"
>>
>> __init__.py file in /modules
>> .py file in /modules
>>
>>
>> Thnx for your help!
>>
>>
>>
>>
>> El sábado, 13 de junio de 2020, 18:45:39 (UTC-5), Ramos escribió:
>>>
>>> if all is ok, restart web2py
>>>
>>> Em dom., 14 de jun. de 2020 às 00:35, patito feo  
>>> escreveu:
>>>
>>>> Hi,
>>>>
>>>> Im trying to use a module file inside /modules/ folder but keep getting 
>>>> this error.
>>>>
>>>>
>>>> failed to reload module because:
>>>>
>>>> ImportError('No module named mdplenus.modules.test',)
>>>>
>>>> -- 
>>>> 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-users" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send 
>>>> an email to web...@googlegroups.com.
>>>> To view this discussion on the web visit 
>>>> https://groups.google.com/d/msgid/web2py/ba92fb90-96da-48a1-8130-b12a0256bb84o%40googlegroups.com
>>>>  
>>>> <https://groups.google.com/d/msgid/web2py/ba92fb90-96da-48a1-8130-b12a0256bb84o%40googlegroups.com?utm_medium=email_source=footer>
>>>> .
>>>>
>>> -- 
>> 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-users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to web...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/web2py/64e635de-af0b-4184-8ae5-d887eb52e346o%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/web2py/64e635de-af0b-4184-8ae5-d887eb52e346o%40googlegroups.com?utm_medium=email_source=footer>
>> .
>>
>

-- 
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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/f2a7c9f8-690d-4754-b4b5-b4dad6d8df22o%40googlegroups.com.


Re: [web2py] No module named error

2020-06-20 Thread patito feo
Hi,

Please define "all ok"

__init__.py file in /modules
.py file in /modules


Thnx for your help!




El sábado, 13 de junio de 2020, 18:45:39 (UTC-5), Ramos escribió:
>
> if all is ok, restart web2py
>
> Em dom., 14 de jun. de 2020 às 00:35, patito feo  > escreveu:
>
>> Hi,
>>
>> Im trying to use a module file inside /modules/ folder but keep getting 
>> this error.
>>
>>
>> failed to reload module because:
>>
>> ImportError('No module named mdplenus.modules.test',)
>>
>> -- 
>> 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-users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to web...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/web2py/ba92fb90-96da-48a1-8130-b12a0256bb84o%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/web2py/ba92fb90-96da-48a1-8130-b12a0256bb84o%40googlegroups.com?utm_medium=email_source=footer>
>> .
>>
>

-- 
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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/64e635de-af0b-4184-8ae5-d887eb52e346o%40googlegroups.com.


[web2py] No module named error

2020-06-13 Thread patito feo
Hi,

Im trying to use a module file inside /modules/ folder but keep getting 
this error.


failed to reload module because:

ImportError('No module named mdplenus.modules.test',)

-- 
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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/ba92fb90-96da-48a1-8130-b12a0256bb84o%40googlegroups.com.


[web2py] web2py python3

2020-05-12 Thread patito feo
Hi,

Having this error when using python3.

 File "//web2py/applications/admin/controllers/default.py" 
, line 
1627, in errors
error = pickle.load(fullpath_file)
  File "/ 
/web2py/gluon/html.py",
 line 692, in XML_unpickle
return XML(marshal.loads(data))
TypeError: a bytes-like object is required, not 'str'

Any ideas?

Cheers,

-- 
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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/da00b94c-bd5b-42cb-a669-12103c434c14%40googlegroups.com.


[web2py] Re: python3 + web2py + Lighttpd + fastcgi

2020-03-26 Thread patito feo
Thank you Massimo.

I will start deploying testing on debian Buster.

El lunes, 23 de marzo de 2020, 23:20:42 (UTC-5), Massimo Di Pierro escribió:
>
> I guess we would have to replace calls to thread. to threading.
>
> Why not use nginx which is kind of the standard today?
>

-- 
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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/44f118f9-1e93-4833-ba70-e62d7c6234c4%40googlegroups.com.


[web2py] Re: python3 + web2py + Lighttpd + fastcgi

2020-03-22 Thread patito feo
Massimo thank you very much for your effort.

  File , line 57, in 
fcgi.WSGIServer(application, bindAddress='/tmp/fcgi.sock').run()
  File , line 1178, in __init__
self._app_lock = thread.allocate_lock()
NameError: global name 'thread' is not defined

I guess this takes more work. I wonder if is it possible to use tornado in 
a production enviroment, using ssl certs like py4web. 
Web2py's anyserver.py doesnt support ssl certs, so it cant be used in 
production.



Thanks for all your work.



El domingo, 22 de marzo de 2020, 16:07:19 (UTC-5), Massimo Di Pierro 
escribió:
>
> I just fixed these issues and a few more. still skeptical this works with 
> py3 without more changes. Thanks for you help
>
>
> On Saturday, 21 March 2020 20:12:01 UTC-7, patito feo wrote:
>>
>> Thank you Massimo.
>>
>> As a result the code now shows more "L" cases, i just removed them. But 
>> now it presents incompatibilities with exceptions and raises.
>>
>>   File , line 618
>> def _end(self, appStatus=0L, protocolStatus=FCGI_REQUEST_COMPLETE):
>>   ^
>> SyntaxError: invalid syntax
>>
>>   File , line 1080
>> except select.error, e:
>>^
>> SyntaxError: invalid syntax
>>
>>
>>   File , line 1134
>> raise NotImplementedError, self.__class__.__name__ + '.handler'
>>  ^
>> SyntaxError: invalid syntax
>>
>>
>>   File , line 1317
>> name, cgi.escape(`environ[name]`))
>>  ^
>> SyntaxError: invalid syntax
>>
>>
>> As i told you before the "L" cases i fixed them, but this others errors 
>> dont know how to fixed them.
>>
>>
>> Thanks for your help.
>>
>>
>>
>> El sábado, 21 de marzo de 2020, 20:26:06 (UTC-5), Massimo Di Pierro 
>> escribió:
>>>
>>> Fixed right now on github. Python 3 does not like the L
>>>
>>> On Saturday, 21 March 2020 16:11:38 UTC-7, patito feo wrote:
>>>>
>>>> Hi all,
>>>>
>>>> I've been trying to run web2py using python3 but unable to do it 
>>>> sucessful.
>>>> Using latest build 2.19.1
>>>>
>>>> I keep getting this error:
>>>>
>>>>  Traceback (most recent call last):
>>>>   File "/folder/folder/folder/fcgihandler.py", line 44, in 
>>>> import gluon.contrib.gateways.fcgi as fcgi
>>>>   File "/folder/folder/folder/gluon/contrib/gateways/fcgi.py", line 439
>>>> s = struct.pack('!L', nameLength | 0x8000L)
>>>>  ^
>>>> SyntaxError: invalid syntax
>>>>
>>>> Please help me find a solution or a replacement.
>>>>
>>>>
>>>> Cheers,
>>>>
>>>

-- 
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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/4f73d7f7-3ff9-43dd-8b41-c413df1a6e26%40googlegroups.com.


[web2py] Re: python3 + web2py + Lighttpd + fastcgi

2020-03-21 Thread patito feo
Thank you Massimo.

As a result the code now shows more "L" cases, i just removed them. But now 
it presents incompatibilities with exceptions and raises.

  File , line 618
def _end(self, appStatus=0L, protocolStatus=FCGI_REQUEST_COMPLETE):
  ^
SyntaxError: invalid syntax

  File , line 1080
except select.error, e:
   ^
SyntaxError: invalid syntax


  File , line 1134
raise NotImplementedError, self.__class__.__name__ + '.handler'
 ^
SyntaxError: invalid syntax


  File , line 1317
name, cgi.escape(`environ[name]`))
 ^
SyntaxError: invalid syntax


As i told you before the "L" cases i fixed them, but this others errors 
dont know how to fixed them.


Thanks for your help.



El sábado, 21 de marzo de 2020, 20:26:06 (UTC-5), Massimo Di Pierro 
escribió:
>
> Fixed right now on github. Python 3 does not like the L
>
> On Saturday, 21 March 2020 16:11:38 UTC-7, patito feo wrote:
>>
>> Hi all,
>>
>> I've been trying to run web2py using python3 but unable to do it 
>> sucessful.
>> Using latest build 2.19.1
>>
>> I keep getting this error:
>>
>>  Traceback (most recent call last):
>>   File "/folder/folder/folder/fcgihandler.py", line 44, in 
>> import gluon.contrib.gateways.fcgi as fcgi
>>   File "/folder/folder/folder/gluon/contrib/gateways/fcgi.py", line 439
>> s = struct.pack('!L', nameLength | 0x8000L)
>>  ^
>> SyntaxError: invalid syntax
>>
>> Please help me find a solution or a replacement.
>>
>>
>> Cheers,
>>
>

-- 
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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/db890a84-1cb3-464b-bec9-d97521e87358%40googlegroups.com.


[web2py] python3 + web2py + Lighttpd + fastcgi

2020-03-21 Thread patito feo
Hi all,

I've been trying to run web2py using python3 but unable to do it sucessful.
Using latest build 2.19.1

I keep getting this error:

 Traceback (most recent call last):
  File "/folder/folder/folder/fcgihandler.py", line 44, in 
import gluon.contrib.gateways.fcgi as fcgi
  File "/folder/folder/folder/gluon/contrib/gateways/fcgi.py", line 439
s = struct.pack('!L', nameLength | 0x8000L)
 ^
SyntaxError: invalid syntax

Please help me find a solution or a replacement.


Cheers,

-- 
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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/7904b215-79c4-4720-8a2e-d2b93501abf9%40googlegroups.com.


[web2py] Re: Problem passing a json object to controller

2019-11-27 Thread Patito Feo
Paco, thanks for your help!

Y Olé


El miércoles, 20 de noviembre de 2019, 18:32:47 (UTC-5), Paco Bernal 
escribió:
>
> H again :)
>
> I think the problem is this
>
> Instead of 
>
> request.vars.items[json1]
>>
>
> use this
>
> request.vars['items[json1]']
>>
>
> because the var is 'items[json1]' requests.vars.items[json1] will look for 
> the key 'json1' in the dict var items and there is no items var only a 
> 'items[json1]' var that's why you need to use ['items[json1]'] and not 
> items[json1]
>
> Regards
>
> El miércoles, 20 de noviembre de 2019, 23:12:45 (UTC+1), Patito Feo 
> escribió:
>>
>> Paco here is the reponse:
>>
>>
>>1. {vars: {…}, respuesta: "noexiste"}
>>   1. respuesta: "noexiste"
>>   2. vars: {tarea: "solicitudguardar", items[json1]: "[1,2,3]"}
>>   3. __proto__: Object
>>
>>
>>
>> Thanks in advance,
>>
>>
>> El miércoles, 20 de noviembre de 2019, 16:39:22 (UTC-5), Paco Bernal 
>> escribió:
>>>
>>> Hi,
>>>
>>> Try this, write down at the begin of the controller
>>>
>>> print request.vars
>>>>
>>>
>>> you will see how the controller receives the information and then you 
>>> will know if it's a js problem or a server side problem.
>>>
>>> with your code what the controller receives is 
>>>
>>> >>> '{"make":"Ford","model":"Mustang","year":1969}'}>
>>>>
>>>
>>> you don't need to use  json.loads, you just need this
>>>
>>>>
>>>> mydata = request.vars['items[json1]']
>>>> print mydata
>>>> {"make":"Ford","model":"Mustang","year":1969}
>>>>
>>>
>>> Regards from spain Ugly Duckling :)
>>>
>>> El miércoles, 20 de noviembre de 2019, 18:08:03 (UTC+1), Patito Feo 
>>> escribió:
>>>>
>>>> Hi,
>>>>
>>>> Ive been trying to pass an object with keys to the controller. But i 
>>>> havent been able to extract the request.vars.
>>>>
>>>> Here is my view:
>>>>
>>>> var Cars = {}
>>>> Cars.make = 'Ford';
>>>> Cars.model = 'Mustang';
>>>> Cars.year = 1969;
>>>>
>>>> $.post( "{{=URL('default', 'transcriptor')}}", //request.post_vars.json1
>>>>{ 
>>>>  tarea: 'solicitudguardar', items: { json1: JSON.stringify( 
>>>> Cars ) }
>>>>}, )
>>>>
>>>>
>>>> Here is my function:
>>>>
>>>> elif request.vars.tarea == 'solicitudguardar':
>>>>
>>>>var = json.loads ( request.post_vars.items[json1] )
>>>>
>>>>
>>>>
>>>> Here is one of the errors i got:
>>>>
>>>> global name 'json1' is not defined
>>>>
>>>>
>>>> I dont understand why the array object is not being process as a json 
>>>> array in controller. 
>>>>
>>>> Any help will be much appreciated.
>>>>
>>>>
>>>> Cheers,
>>>>
>>>

-- 
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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/76ccd537-0808-4385-b536-38a36a7f23c7%40googlegroups.com.


[web2py] Re: Problem passing a json object to controller

2019-11-20 Thread Patito Feo
Paco here is the reponse:


   1. {vars: {…}, respuesta: "noexiste"}
  1. respuesta: "noexiste"
  2. vars: {tarea: "solicitudguardar", items[json1]: "[1,2,3]"}
  3. __proto__: Object
   


Thanks in advance,


El miércoles, 20 de noviembre de 2019, 16:39:22 (UTC-5), Paco Bernal 
escribió:
>
> Hi,
>
> Try this, write down at the begin of the controller
>
> print request.vars
>>
>
> you will see how the controller receives the information and then you will 
> know if it's a js problem or a server side problem.
>
> with your code what the controller receives is 
>
> > '{"make":"Ford","model":"Mustang","year":1969}'}>
>>
>
> you don't need to use  json.loads, you just need this
>
>>
>> mydata = request.vars['items[json1]']
>> print mydata
>> {"make":"Ford","model":"Mustang","year":1969}
>>
>
> Regards from spain Ugly Duckling :)
>
> El miércoles, 20 de noviembre de 2019, 18:08:03 (UTC+1), Patito Feo 
> escribió:
>>
>> Hi,
>>
>> Ive been trying to pass an object with keys to the controller. But i 
>> havent been able to extract the request.vars.
>>
>> Here is my view:
>>
>> var Cars = {}
>> Cars.make = 'Ford';
>> Cars.model = 'Mustang';
>> Cars.year = 1969;
>>
>> $.post( "{{=URL('default', 'transcriptor')}}", //request.post_vars.json1
>>{ 
>>  tarea: 'solicitudguardar', items: { json1: JSON.stringify( Cars 
>> ) }
>>}, )
>>
>>
>> Here is my function:
>>
>> elif request.vars.tarea == 'solicitudguardar':
>>
>>var = json.loads ( request.post_vars.items[json1] )
>>
>>
>>
>> Here is one of the errors i got:
>>
>> global name 'json1' is not defined
>>
>>
>> I dont understand why the array object is not being process as a json 
>> array in controller. 
>>
>> Any help will be much appreciated.
>>
>>
>> Cheers,
>>
>

-- 
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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/e4f7a303-0bf6-40c6-9565-e4ec8f12918b%40googlegroups.com.


Re: [web2py] Problem passing a json object to controller

2019-11-20 Thread Patito Feo
Javier, 

Tested and not working.

 'builtin_function_or_method' object has no 
attribute '__getitem__'

request.post_vars   


Any ideas?

Thanks for your reply,


El miércoles, 20 de noviembre de 2019, 12:35:38 (UTC-5), Javier Pepe 
escribió:
>
> You need use:
>
>var = json.loads ( request.post_vars.items[*"*json1*"*] )
>
>
> El mié., 20 de nov. de 2019 a la(s) 14:08, Patito Feo (patito...@gmail.com 
> ) escribió:
>
>> Hi,
>>
>> Ive been trying to pass an object with keys to the controller. But i 
>> havent been able to extract the request.vars.
>>
>> Here is my view:
>>
>> var Cars = {}
>> Cars.make = 'Ford';
>> Cars.model = 'Mustang';
>> Cars.year = 1969;
>>
>> $.post( "{{=URL('default', 'transcriptor')}}", //request.post_vars.json1
>>{ 
>>  tarea: 'solicitudguardar', items: { json1: JSON.stringify( Cars 
>> ) }
>>}, )
>>
>>
>> Here is my function:
>>
>> elif request.vars.tarea == 'solicitudguardar':
>>
>>var = json.loads ( request.post_vars.items[json1] )
>>
>>
>>
>> Here is one of the errors i got:
>>
>> global name 'json1' is not defined
>>
>>
>> I dont understand why the array object is not being process as a json 
>> array in controller. 
>>
>> Any help will be much appreciated.
>>
>>
>> Cheers,
>>
>> -- 
>> 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-users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to web...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/web2py/cb71d997-01f3-4dd3-b689-35c280e035b7%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/web2py/cb71d997-01f3-4dd3-b689-35c280e035b7%40googlegroups.com?utm_medium=email_source=footer>
>> .
>>
>

-- 
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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/fbcef80d-d1ae-4cae-b22a-5fa10eb5156a%40googlegroups.com.


[web2py] Problem passing a json object to controller

2019-11-20 Thread Patito Feo
Hi,

Ive been trying to pass an object with keys to the controller. But i havent 
been able to extract the request.vars.

Here is my view:

var Cars = {}
Cars.make = 'Ford';
Cars.model = 'Mustang';
Cars.year = 1969;

$.post( "{{=URL('default', 'transcriptor')}}", //request.post_vars.json1
   { 
 tarea: 'solicitudguardar', items: { json1: JSON.stringify( Cars ) }
   }, )


Here is my function:

elif request.vars.tarea == 'solicitudguardar':

   var = json.loads ( request.post_vars.items[json1] )
   
   

Here is one of the errors i got:

global name 'json1' is not defined


I dont understand why the array object is not being process as a json array 
in controller. 

Any help will be much appreciated.


Cheers,

-- 
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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/cb71d997-01f3-4dd3-b689-35c280e035b7%40googlegroups.com.


[web2py] How to switch from cpython to pypy?

2019-10-26 Thread Patito Feo
Hi all,

Anyone has a guide or a recipe that can show the way?



Regards,

-- 
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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/992633f5-7e4e-4712-bde7-2c720ff9928a%40googlegroups.com.


[web2py] Re: Lighttpd and fcgihandler processes

2019-10-25 Thread Patito Feo
Hi again,

No answers to this post.
Now i have more questions about fcgihandler and the fcgi.py file.

Fcgihandler is supposed to call fcgi.py. How can i be sure the pyc is the 
one been used?
is there a way to speed up or compile this libraries like pypy or something?


Cheers,


El jueves, 22 de agosto de 2019, 23:39:13 (UTC-5), Patito Feo escribió:
>
> Hi,
>
> I have web2py running over lighttpd. By the moment my currents apps dont 
> have high load average.
> Checking my processes, i found a single python fcgihandler.py process. 
>
> python /home/www-data/web2py/fcgihandler.py
>
> Is this normal? 
> How affect this in case of high loads?
> Is the a way to run more threads? Will this help?
> What happend on multiple concurrent requests?
>
> Apologies for my lack of knowledge and thank you for your comments,
>
>
> Regards,
>
>

-- 
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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/005482f1-287b-4260-999a-f73020b5398f%40googlegroups.com.


[web2py] custom autocomplete fields and style

2019-10-22 Thread Patito Feo
Hi,

Is it possible to show an array of fields in the autocomplete like "field1 
- field2" ?
How can i stylish the dropdown options, backgroup colors, z-indez, position 
etc?


Regards,

-- 
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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/727ca519-09aa-4b55-b3af-70159ec8886b%40googlegroups.com.


Re: [web2py] multi tables count

2019-10-15 Thread Patito Feo
Well, I just tried your reply and it works. I didnt know i was able to 
groupby mutiple fields and the count should be the id. One complete week 
stuck in this. 


Thanks a lot.



El martes, 15 de octubre de 2019, 15:52:25 (UTC-5), Massimiliano escribió:
>
> I don't understand exactly what you mean, but maybe, you want to count 
> itemspedidos.id grouping by [db.pedidos.fecha.month(), 
> db.itemspedidos.COD_REFE]
>
> rows=db( (db.pedidos.fecha.year() == '2019' )&( db.itemspedidos.COD_PEDI 
> == db.pedidos.id )).select( db.itemspedidos.COD_REFE, 
> db.itemspedidos.id.count(), db.pedidos.fecha.month(), 
> orderby=db.pedidos.fecha.month(), groupby=[db.pedidos.fecha.month(), 
> db.itemspedidos.COD_REFE])
>
> On Tue, Oct 15, 2019 at 10:07 PM Patito Feo  > wrote:
>
>> Hi,
>>
>> Ive been trying many ways of getting this right,
>>
>> db.define_table('pedidos',
>> Field('fecha',  type='date' ),
>> Field('cliente', ),
>> Field('pares', ),
>> Field('estado', ),
>> Field('noitems', ),
>> Field('notapedido', ),
>> Field('tipopedido', ),
>> Field('vendedor', ),
>>)
>>
>> db.define_table('itemspedidos',
>> Field('NUM_ITEM', 'integer'),
>> Field('COD_PEDI', 'integer'),
>> Field('COD_CLIE', ),
>> Field('OD_SUCU' ),
>> Field('TIP_PEDI', ),
>> Field('TIP_BASE', ),
>> Field('COD_REFE', ),
>> Field('COD_COLO', ),
>> Field('CAN_PEDI', 'integer' ),
>> Field('CAMPO_01', 'integer' ),
>> Field('CAMPO_02', 'integer' ),
>> Field('CAMPO_03', 'integer' ),
>> Field('CAMPO_04', 'integer' ),
>> Field('CAMPO_05', 'integer' ),
>> Field('CAMPO_06', 'integer' ),
>> Field('CAMPO_07', 'integer' ),
>> Field('CAMPO_S1', 'integer' ),
>> Field('CAMPO_S2', 'integer' ),
>> Field('CAMPO_S3', 'integer' ),
>> Field('CAMPO_S4', 'integer' ),
>> Field('CAMPO_S5', 'integer'),
>> Field('CAMPO_S6',  'integer'),
>> Field('CAMPO_S7', 'integer' ),
>> Field('CAN_DOCE', 'integer' ),
>>)
>>
>> I need to find pedidos by month using pedidos.fecha and to count how many 
>> itemspedidos.COD_REFE are per month by each itemspedidos.COD_REFE which is 
>> the item reference.
>>
>> rows=db( db.pedidos.fecha.year() == '2019' )( db.itemspedidos.COD_PEDI == 
>> db.pedidos.id ).select( db.itemspedidos.COD_REFE, 
>> db.itemspedidos.COD_REFE.count( distinct=True ), db.pedidos.fecha.month(), 
>> orderby=db.pedidos.fecha.month(), groupby=db.pedidos.fecha.month(), )
>>
>> This is a sample of what i get:
>>
>> itemspedidos.COD_REFE EXTRACT(month FROM "pedidos"."fecha")
>> 132 MILAN 4
>> 132 MILAN 4
>> 132 MILAN 4
>> 113 SARA 4
>> 122 CLAUDIA NIÑA 4
>> 122 CLAUDIA NIÑA 4
>> 122 CLAUDIA NIÑA 4
>> 122 CLAUDIA NIÑA 4
>>
>> As you can see i get the month and the itemspedidos.COD_REFE, but im 
>> unable to count by itemspedidos.COD_REFE per month and per unique 
>> itemspedidos.COD_REFE.
>>
>> Some advice would be nice,
>>
>>
>> Thanks in advance
>>
>>
>> -- 
>> 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-users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to web...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/web2py/b1c42e0f-487b-4796-84ca-702298c399f8%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/web2py/b1c42e0f-487b-4796-84ca-702298c399f8%40googlegroups.com?utm_medium=email_source=footer>
>> .
>>
>
>
> -- 
> Massimiliano
>

-- 
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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/02b803a2-317f-4d3c-bcd0-450337f9f169%40googlegroups.com.


[web2py] multi tables count

2019-10-15 Thread Patito Feo
Hi,

Ive been trying many ways of getting this right,

db.define_table('pedidos',
Field('fecha',  type='date' ),
Field('cliente', ),
Field('pares', ),
Field('estado', ),
Field('noitems', ),
Field('notapedido', ),
Field('tipopedido', ),
Field('vendedor', ),
   )

db.define_table('itemspedidos',
Field('NUM_ITEM', 'integer'),
Field('COD_PEDI', 'integer'),
Field('COD_CLIE', ),
Field('OD_SUCU' ),
Field('TIP_PEDI', ),
Field('TIP_BASE', ),
Field('COD_REFE', ),
Field('COD_COLO', ),
Field('CAN_PEDI', 'integer' ),
Field('CAMPO_01', 'integer' ),
Field('CAMPO_02', 'integer' ),
Field('CAMPO_03', 'integer' ),
Field('CAMPO_04', 'integer' ),
Field('CAMPO_05', 'integer' ),
Field('CAMPO_06', 'integer' ),
Field('CAMPO_07', 'integer' ),
Field('CAMPO_S1', 'integer' ),
Field('CAMPO_S2', 'integer' ),
Field('CAMPO_S3', 'integer' ),
Field('CAMPO_S4', 'integer' ),
Field('CAMPO_S5', 'integer'),
Field('CAMPO_S6',  'integer'),
Field('CAMPO_S7', 'integer' ),
Field('CAN_DOCE', 'integer' ),
   )

I need to find pedidos by month using pedidos.fecha and to count how many 
itemspedidos.COD_REFE are per month by each itemspedidos.COD_REFE which is 
the item reference.

rows=db( db.pedidos.fecha.year() == '2019' )( db.itemspedidos.COD_PEDI == 
db.pedidos.id ).select( db.itemspedidos.COD_REFE, 
db.itemspedidos.COD_REFE.count( distinct=True ), db.pedidos.fecha.month(), 
orderby=db.pedidos.fecha.month(), groupby=db.pedidos.fecha.month(), )

This is a sample of what i get:

itemspedidos.COD_REFE EXTRACT(month FROM "pedidos"."fecha")
132 MILAN 4
132 MILAN 4
132 MILAN 4
113 SARA 4
122 CLAUDIA NIÑA 4
122 CLAUDIA NIÑA 4
122 CLAUDIA NIÑA 4
122 CLAUDIA NIÑA 4

As you can see i get the month and the itemspedidos.COD_REFE, but im unable 
to count by itemspedidos.COD_REFE per month and per unique 
itemspedidos.COD_REFE.

Some advice would be nice,


Thanks in advance


-- 
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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/b1c42e0f-487b-4796-84ca-702298c399f8%40googlegroups.com.


[web2py] Re: How to stopped redirection to user/login.html

2019-09-17 Thread Patito Feo
Hi,

After many hours of desperately search i found the solution.

You dont import Auth() on any of the controllers.

#from gluon.tools import Auth
#auth = Auth(db)

So, in db.py will imported and configured it for all the app.


Regards,



El miércoles, 11 de septiembre de 2019, 18:40:26 (UTC-5), Patito Feo 
escribió:
>
> Hi,
>
> I had done tests using a new empty application and this works. 
> My current application uses a customdb auth table and its using 
>
> auth.settings.on_failed_authentication = lambda url: redirect(url)
>
>
> but with custom tables settings do not apply.
>
> This are my auth.settings: 'on_failed_authentication':  
> at 0x7ff0d5f81758>.
> The setting is set correctly but still redirects to user/login.
>
>
> Regards,
>
>
>
> El jueves, 22 de agosto de 2019, 19:01:04 (UTC-5), Dave S escribió:
>>
>> On Thursday, August 22, 2019 at 4:32:02 PM UTC-7, Patito Feo wrote:
>>>
>>> Hi,
>>>
>>> This does not worked.
>>> Redirecting still goes to user/login.html.
>>>
>>> Any ideas?
>>>
>>> Cheers,
>>>
>>
>>
>> For a little more context, here's a larger quote form the book:
>>
>> If the visitor is not logger in, and calls a function that requires 
>>> authentication, the user is redirected to auth.settings.login_url which 
>>> defaults to URL('default', 'user/login'). One can replace this behavior by 
>>> redefining:
>>>
>>> auth.settings.on_failed_authentication = lambda url: redirect(url)
>>> This is the function called for the redirection. The argument url` 
>>> passed to this function is the url for the login page.
>>>
>>> If the visitor does not have permission to access a given function, the 
>>> visitor is redirect to the URL defined by
>>>
>>> auth.settings.on_failed_authorization = URL('user', 
>>> args='on_failed_authorization')
>>> You can change this variable and redirect the user elsewhere.
>>>
>>> Often on_failed_authorization is a URL but it can be a function that 
>>> returns the URL and it will be called on failed authorization.
>>>
>>
>>
>> from > http://web2py.com/books/default/chapter/29/09/access-control#Auth-Settings-and-messages
>> >
>>
>> Good luck!
>>
>> /dps
>>  
>>
>>>
>>> El jueves, 22 de agosto de 2019, 0:44:39 (UTC-5), Annet escribió:
>>>>
>>>> What about:
>>>>
>>>> auth.settings.on_failed_authentication = lambda url: redirect(url)
>>>>
>>>>
>>>> That is what the book says changing the default behaviour.
>>>>
>>>>
>>>> Kind regards,
>>>>
>>>> Annet
>>>>
>>>>
>>>>
>>>>

-- 
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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/d0510ea8-34de-43fa-902f-d6ccea840dbc%40googlegroups.com.


[web2py] Re: How to stopped redirection to user/login.html

2019-09-11 Thread Patito Feo
Hi,

I had done tests using a new empty application and this works. 
My current application uses a customdb auth table and its using 

auth.settings.on_failed_authentication = lambda url: redirect(url)


but with custom tables settings do not apply.


Regards,



El jueves, 22 de agosto de 2019, 19:01:04 (UTC-5), Dave S escribió:
>
> On Thursday, August 22, 2019 at 4:32:02 PM UTC-7, Patito Feo wrote:
>>
>> Hi,
>>
>> This does not worked.
>> Redirecting still goes to user/login.html.
>>
>> Any ideas?
>>
>> Cheers,
>>
>
>
> For a little more context, here's a larger quote form the book:
>
> If the visitor is not logger in, and calls a function that requires 
>> authentication, the user is redirected to auth.settings.login_url which 
>> defaults to URL('default', 'user/login'). One can replace this behavior by 
>> redefining:
>>
>> auth.settings.on_failed_authentication = lambda url: redirect(url)
>> This is the function called for the redirection. The argument url` passed 
>> to this function is the url for the login page.
>>
>> If the visitor does not have permission to access a given function, the 
>> visitor is redirect to the URL defined by
>>
>> auth.settings.on_failed_authorization = URL('user', 
>> args='on_failed_authorization')
>> You can change this variable and redirect the user elsewhere.
>>
>> Often on_failed_authorization is a URL but it can be a function that 
>> returns the URL and it will be called on failed authorization.
>>
>
>
> from  http://web2py.com/books/default/chapter/29/09/access-control#Auth-Settings-and-messages
> >
>
> Good luck!
>
> /dps
>  
>
>>
>> El jueves, 22 de agosto de 2019, 0:44:39 (UTC-5), Annet escribió:
>>>
>>> What about:
>>>
>>> auth.settings.on_failed_authentication = lambda url: redirect(url)
>>>
>>>
>>> That is what the book says changing the default behaviour.
>>>
>>>
>>> Kind regards,
>>>
>>> Annet
>>>
>>>
>>>
>>>

-- 
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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/547cb1b3-0856-4dce-93d0-42340edf13fa%40googlegroups.com.


Re: [web2py] Re: How do I display db text/string fields in the format in which they were entered on the form?

2019-08-31 Thread Patito Feo
Hi,

Im testing this, but it seems somethings changed to date. 

Here is what im getting on the textarea:

prueba textarea 3prueba textarea 3prueba textarea 3


As you can see, \n new lines are converted to  but render as .


Any suggestion?


Regards,



El jueves, 20 de octubre de 2016, 14:07:57 (UTC-5), Anthony escribió:
>
> Oops, forgot about the indenting -- just replace all spaces with "":
>
> {{=XML(site.other.replace('\n', '').replace(' ', ''),
>sanitize=True, permitted_tags=['br/'])}}
>
> Anthony
>
> On Thursday, October 20, 2016 at 2:29:51 PM UTC-4, Steven Vannoy wrote:
>>
>> Thanks, the replace option from @Anthony worked pretty well, it got the 
>> new lines but didn't provide indentation (as expected). The  
>> tags get both, and I like the font well enough except that it is a lighter 
>> gray on a gray background so if I can manage to get that changed I'll 
>> probably go with that option.
>>
>> Yes Dave, you were right it wasn't stripping the asterisks but wasn't 
>> rendering them the way I would like. 
>>
>> Steven
>>
>>
>> On Thu, Oct 20, 2016 at 2:07 PM, Anthony 
>> > wrote:
>>
>>> On Thursday, October 20, 2016 at 2:01:09 PM UTC-4, Dave S wrote:


 I'm going to go out on a limb, and opine that you never even get the 
 newlines or indentation (but do get the asterisks), all that having been 
 stripped out by the textarea input control.

>>>
>>> No, a textarea does preserve newlines.
>>>
>>> Anthony
>>>
>>> -- 
>>> 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 a topic in the 
>>> Google Groups "web2py-users" group.
>>> To unsubscribe from this topic, visit 
>>> https://groups.google.com/d/topic/web2py/WM3hhsJVUYU/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to 
>>> web...@googlegroups.com .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>

-- 
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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/d76e579c-7cad-4fe9-b5ee-0248c44ca008%40googlegroups.com.


[web2py] Re: How to stopped redirection to user/login.html

2019-08-31 Thread Patito Feo
Any suggestion?


Cheers,


El jueves, 22 de agosto de 2019, 23:27:34 (UTC-5), Patito Feo escribió:
>
> Hi and thanks for your answer,
>
> I did what the manual points to do. But the redirection still points to 
> user/login.html. In fact here is part of my config:
>
> auth.settings.login_url = URL( 'ingreso' )
> auth.settings.logged_url = URL( 'preferencias')
>
> auth.settings.on_failed_authentication = lambda url: redirect( URL( 
> 'ingreso' ) )
>
>
> I have defined a auth custom table, is there anything Im missing?
>
>
> Regards,
>
> El jueves, 22 de agosto de 2019, 19:01:04 (UTC-5), Dave S escribió:
>>
>> On Thursday, August 22, 2019 at 4:32:02 PM UTC-7, Patito Feo wrote:
>>>
>>> Hi,
>>>
>>> This does not worked.
>>> Redirecting still goes to user/login.html.
>>>
>>> Any ideas?
>>>
>>> Cheers,
>>>
>>
>>
>> For a little more context, here's a larger quote form the book:
>>
>> If the visitor is not logger in, and calls a function that requires 
>>> authentication, the user is redirected to auth.settings.login_url which 
>>> defaults to URL('default', 'user/login'). One can replace this behavior by 
>>> redefining:
>>>
>>> auth.settings.on_failed_authentication = lambda url: redirect(url)
>>> This is the function called for the redirection. The argument url` 
>>> passed to this function is the url for the login page.
>>>
>>> If the visitor does not have permission to access a given function, the 
>>> visitor is redirect to the URL defined by
>>>
>>> auth.settings.on_failed_authorization = URL('user', 
>>> args='on_failed_authorization')
>>> You can change this variable and redirect the user elsewhere.
>>>
>>> Often on_failed_authorization is a URL but it can be a function that 
>>> returns the URL and it will be called on failed authorization.
>>>
>>
>>
>> from > http://web2py.com/books/default/chapter/29/09/access-control#Auth-Settings-and-messages
>> >
>>
>> Good luck!
>>
>> /dps
>>  
>>
>>>
>>> El jueves, 22 de agosto de 2019, 0:44:39 (UTC-5), Annet escribió:
>>>>
>>>> What about:
>>>>
>>>> auth.settings.on_failed_authentication = lambda url: redirect(url)
>>>>
>>>>
>>>> That is what the book says changing the default behaviour.
>>>>
>>>>
>>>> Kind regards,
>>>>
>>>> Annet
>>>>
>>>>
>>>>
>>>>

-- 
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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/0dbd96f1-0145-4c43-8de1-bd71d0eedb85%40googlegroups.com.


[web2py] Re: Custom form errors style

2019-08-23 Thread Patito Feo
Hi,

This did the trick. Thank you very much!!


El viernes, 23 de agosto de 2019, 10:09:01 (UTC-5), Annet escribió:
>
>  To diasble it:
>
> if form.accepts(..., hideerror=False):
>
>
> to restyle it, restyle:
>
> .error
>
>
> Kind regards,
>
> Annet
>
>

-- 
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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/211c6995-a634-413d-9211-b832d07fc615%40googlegroups.com.


[web2py] Lighttpd and fcgihandler processes

2019-08-22 Thread Patito Feo
Hi,

I have web2py running over lighttpd. By the moment my currents apps dont 
have high load average.
Checking my processes, i found a single python fcgihandler.py process. 

python /home/www-data/web2py/fcgihandler.py

Is this normal? 
How affect this in case of high loads?
Is the a way to run more threads? Will this help?
What happend on multiple concurrent requests?

Apologies for my lack of knowledge and thank you for your comments,


Regards,

-- 
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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/e832905e-33e1-4db4-bef1-133e1f491d60%40googlegroups.com.


[web2py] Re: How to stopped redirection to user/login.html

2019-08-22 Thread Patito Feo
Hi and thanks for your answer,

I did what the manual points to do. But the redirection still points to 
user/login.html. In fact here is part of my config:

auth.settings.login_url = URL( 'ingreso' )
auth.settings.logged_url = URL( 'preferencias')

auth.settings.on_failed_authentication = lambda url: redirect( URL( 
'ingreso' ) )


I have defined a auth custom table, is there anything Im missing?


Regards,

El jueves, 22 de agosto de 2019, 19:01:04 (UTC-5), Dave S escribió:
>
> On Thursday, August 22, 2019 at 4:32:02 PM UTC-7, Patito Feo wrote:
>>
>> Hi,
>>
>> This does not worked.
>> Redirecting still goes to user/login.html.
>>
>> Any ideas?
>>
>> Cheers,
>>
>
>
> For a little more context, here's a larger quote form the book:
>
> If the visitor is not logger in, and calls a function that requires 
>> authentication, the user is redirected to auth.settings.login_url which 
>> defaults to URL('default', 'user/login'). One can replace this behavior by 
>> redefining:
>>
>> auth.settings.on_failed_authentication = lambda url: redirect(url)
>> This is the function called for the redirection. The argument url` passed 
>> to this function is the url for the login page.
>>
>> If the visitor does not have permission to access a given function, the 
>> visitor is redirect to the URL defined by
>>
>> auth.settings.on_failed_authorization = URL('user', 
>> args='on_failed_authorization')
>> You can change this variable and redirect the user elsewhere.
>>
>> Often on_failed_authorization is a URL but it can be a function that 
>> returns the URL and it will be called on failed authorization.
>>
>
>
> from  http://web2py.com/books/default/chapter/29/09/access-control#Auth-Settings-and-messages
> >
>
> Good luck!
>
> /dps
>  
>
>>
>> El jueves, 22 de agosto de 2019, 0:44:39 (UTC-5), Annet escribió:
>>>
>>> What about:
>>>
>>> auth.settings.on_failed_authentication = lambda url: redirect(url)
>>>
>>>
>>> That is what the book says changing the default behaviour.
>>>
>>>
>>> Kind regards,
>>>
>>> Annet
>>>
>>>
>>>
>>>

-- 
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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/85363289-4bc0-4397-aaf9-10223c036a82%40googlegroups.com.


[web2py] Re: How to stopped redirection to user/login.html

2019-08-22 Thread Patito Feo
Hi,

This does not worked.
Redirecting still goes to user/login.html.

Any ideas?


Cheers,

El jueves, 22 de agosto de 2019, 0:44:39 (UTC-5), Annet escribió:
>
> What about:
>
> auth.settings.on_failed_authentication = lambda url: redirect(url)
>
>
> That is what the book says changing the default behaviour.
>
>
> Kind regards,
>
> Annet
>
>
>
>

-- 
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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/0a0583ef-45bd-4cda-bd1b-243cda1fd122%40googlegroups.com.


[web2py] Custom form errors style

2019-08-22 Thread Patito Feo
Hi,

I need to disable the form error_wraper DIVs or custom style those.

How can i do either of those?


Regards,

-- 
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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/7f82e899-eeb9-4895-a2d7-347e66847845%40googlegroups.com.


[web2py] How to stopped redirection to user/login.html

2019-08-21 Thread Patito Feo
Hi,

I have created a login.html page. I intent to redirect users to this url 
instead of default behavior redirecting to user/login.html.
In fact i have commented out entire user() function on controller.
Also i have,

auth.settings.login_url = URL( 'default', 'mylogin ) and 
auth.settings.on_failed_authentication = URL('default', 'mylogin')

But controller is still redirecting to user/login.


Any ideas?


Cheers,

-- 
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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/69f96045-ce1d-4bc9-a903-53cf08001432%40googlegroups.com.


[web2py] Re: How to do I stop auth.requires_login() from redirecting to the default/user controller?

2019-08-07 Thread Patito Feo
Hi,

This is not working.
Neither is this 

auth.settings.on_failed_authentication


Any ideas?


El viernes, 10 de mayo de 2019, 12:55:40 (UTC-5), Leonel Câmara escribió:
>
> You need to set login_url
>
> auth.settings.login_url = URL(YOUR_NEW_CONTROLLER, YOUR_NEW_FUNCTION) 
>

-- 
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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/e0e7e52f-827d-45c4-907b-a8c267ac9f6b%40googlegroups.com.