[web2py] Re: web2py - date picker issue

2020-05-05 Thread Scott Hunter
What do you mean by "redirected"?  If you just mean that the date field is 
reset to the current date, that is the same default behavior for all input 
fields.

On Tuesday, May 5, 2020 at 12:44:31 AM UTC-4, Anuj Mahawar wrote:
>
> I am a beginner to the web2py. I am building an application with a date 
> picker on the home page. The issue is - Whenever I try to edit a previous 
> day's record and submit, instead of on being on the same date, it is being 
> redirected to the current date page. e.g. suppose I have logged in and it 
> displays the current date i.e. 29 April 2020. When I try to edit a record 
> for 01 April 2020 and submit the entry, it is being redirected to the 
> current date i.e. 29 April 2020. Any idea why the application is behaving 
> like 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 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/f7e96af3-d922-4f51-aab4-3bcf0d9d4fcf%40googlegroups.com.


[web2py] Re: web2py - date picker issue

2020-05-05 Thread Anuj Mahawar
Hey Scott, 
Yeah, I meant that the date is resetting to the current date even though I 
am selecting any previous date. Do you have any suggestions to change this 
default behavior?

On Tuesday, May 5, 2020 at 5:22:30 PM UTC+5:30, Scott Hunter wrote:
>
> What do you mean by "redirected"?  If you just mean that the date field is 
> reset to the current date, that is the same default behavior for all input 
> fields.
>
> On Tuesday, May 5, 2020 at 12:44:31 AM UTC-4, Anuj Mahawar wrote:
>>
>> I am a beginner to the web2py. I am building an application with a date 
>> picker on the home page. The issue is - Whenever I try to edit a previous 
>> day's record and submit, instead of on being on the same date, it is being 
>> redirected to the current date page. e.g. suppose I have logged in and it 
>> displays the current date i.e. 29 April 2020. When I try to edit a record 
>> for 01 April 2020 and submit the entry, it is being redirected to the 
>> current date i.e. 29 April 2020. Any idea why the application is behaving 
>> like 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 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/8b558fe5-7a18-4389-a82f-99df8bff0e1c%40googlegroups.com.


[web2py] Re: web2py - date picker issue

2020-05-05 Thread Scott Hunter
If this is part of a form (which I have to guess at, since you have 
provided *no* details), you can use the `keepvalues` option to not reset 
the fields of a form.

On Tuesday, May 5, 2020 at 8:24:32 AM UTC-4, Anuj Mahawar wrote:
>
> Hey Scott, 
> Yeah, I meant that the date is resetting to the current date even though I 
> am selecting any previous date. Do you have any suggestions to change this 
> default behavior?
>
> On Tuesday, May 5, 2020 at 5:22:30 PM UTC+5:30, Scott Hunter wrote:
>>
>> What do you mean by "redirected"?  If you just mean that the date field 
>> is reset to the current date, that is the same default behavior for all 
>> input fields.
>>
>> On Tuesday, May 5, 2020 at 12:44:31 AM UTC-4, Anuj Mahawar wrote:
>>>
>>> I am a beginner to the web2py. I am building an application with a date 
>>> picker on the home page. The issue is - Whenever I try to edit a previous 
>>> day's record and submit, instead of on being on the same date, it is being 
>>> redirected to the current date page. e.g. suppose I have logged in and it 
>>> displays the current date i.e. 29 April 2020. When I try to edit a record 
>>> for 01 April 2020 and submit the entry, it is being redirected to the 
>>> current date i.e. 29 April 2020. Any idea why the application is behaving 
>>> like 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 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/2c1f0cb7-0ba7-4f3b-a54b-bdc2d3f5ead1%40googlegroups.com.


[web2py] Re: Autocomplete widget filter values

2020-05-05 Thread 'Annet' via web2py-users
Hi Anthony,

I am rebuilding an application that uses the jQuery UI autocomplete widget.

In the view I have the following code:


$(function() {$("#no_table_name").autocomplete({source: "{{=URL('jquery', 
'name_autocomplete')}}", minLength: 2});});


name_autocomplete is a function in the jquery controller:

def name_autocomplete():
left = [db.app_settings.on(db.vtx_vertex.id==db.app_settings.vertexID)]
rows = db((db.vtx_vertex.name.contains(request.get_vars.term, 
case_sensitive=False)) &
  ((db.vtx_vertex.typeID.belongs(ORGANIZATIONID, IOTHINGID)) |
  ((db.vtx_vertex.typeID==PERSONID) & 
(db.app_settings.viewtypeID>ZEROID) &
   
(db.app_settings.openID==PUBLIC.select(db.vtx_vertex.name, left=left, 
distinct=True,
  
orderby=db.vtx_vertex.name).as_list()

result = [r['name'] for r in rows]
return response.json(result)


I'd like to use SQLFORM.widgets.autocomplete(request, db.vtx_vertex.name, 
limitby=(0,10), min_length=2, db=db(Filter))


I don't know how to code the filter to give me the same list of values.

Is it possible for Filter to call name_autocomplete() in the jquery 
controller.



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/4e85a328-c1de-46df-9b5c-632b865e4e83%40googlegroups.com.


[web2py] login after period of inactivity

2020-05-05 Thread Maurice Waka
I notice this message after a period of inactivity. See attached.
The problem is that on clicking on the login link on the app on 
pythonanywhere, I get an error: invalid view (default/user/load).
How can I resolve this?
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/b7255457-823b-4d88-a64d-3e2076df8f86%40googlegroups.com.


[web2py] Re: login after period of inactivity

2020-05-05 Thread Jim S
Can you show some code?

-Jim

On Tuesday, May 5, 2020 at 1:38:29 PM UTC-5, Maurice Waka wrote:
>
> I notice this message after a period of inactivity. See attached.
> The problem is that on clicking on the login link on the app on 
> pythonanywhere, I get an error: invalid view (default/user/load).
> How can I resolve this?
> 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/541b05b3-02b7-4bc8-8773-f093a41bc1ce%40googlegroups.com.


Re: [web2py] Re: web2py online debugger under python3

2020-05-05 Thread Clemens
Hi Andrew,

well, I would say, it's because I ever used it and it's okay for me. But 
which one would you recommend? And how to connect your favorite debugger 
with web2py? Never used another debugger for web2py.

Regards
Clemens


On Tuesday, May 5, 2020 at 1:56:25 AM UTC+2, AGRogers wrote:
>
> Hi Clemens
>
> I definitely can't help you with this problem. Sorry. But I am interested 
> in why you use the online debugger and not something else?
>
> Thanks
> Andrew
>
> On Mon, 4 May 2020 at 23:50, Clemens  > wrote:
>
>> Hello Massimo,
>>
>> I hoped the latest web2py version would fix the problem. My current 
>> configuration is now:
>> web2py version 2.20.4-stable+timestamp.2020.05.03.05.18.50, Running on 
>> Rocket 1.2.6, Python 3.6.9, Ubuntu 18.04., Firefox 75.0 (64-bit)
>>
>> But the online debugger still doesn't work. The debugger doesn't catch 
>> the breakpoint, set in my code. Instead, after waiting a few minutes I got 
>> the following new situation:
>>
>> [image: Screenshot_2020-05-04 interact.png]
>>
>> [image: Screenshot_2020-05-04 interact-02.png]
>> Do you have any idea, how I can fix this?
>>
>> Best regards
>> Clemens
>>
>>
>> On Sunday, April 26, 2020 at 8:46:00 AM UTC+2, Massimo Di Pierro wrote:
>>>
>>> what browser?
>>>
>>> On Monday, 30 March 2020 13:23:57 UTC-7, Clemens wrote:

 Hello everybody!

 I've switched my web2py app from python2 to python3. The app itself 
 works fine, but the web2py online debugger doesn't work anymore and is 
 mostly freezing. Sometimes a get the following error message:

 Exception timeout: timeout('timed out',)

 Traceback (most recent call last): File "/usr/lib/python3.6/socket.py", 
 line 586, in readinto return self._sock.recv_into(b) socket.timeout: timed 
 out

 My configuration is as follows:

 web2py 2.19.1-stable+timestamp.2020.03.21.21.49.28 (Running on Rocket 
 1.2.6, Python 3.6.9), Ubuntu 18.04 LTS

 What do I have to change additionally that the online debugger is 
 working under python3?


 Thanks a lot for any support!


 Best regards Clemens

>>> -- 
>> 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/ccc32a55-4a15-4f88-9b0f-69326542b6f0%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
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/73792fd3-310e-43e6-89d6-5f615e12546d%40googlegroups.com.


Re: [web2py] Re: web2py online debugger under python3

2020-05-05 Thread AGRogers
Hi Clemens

I think a standalone debugger is much better. The online debugger could be
great to debug applications in production  though.

Where are you doing your development? On your local machine or Python
Anywhere or somewhere else?  I don't think it's possible to debug using
Visual Studio Code or PyCharm if web2py is not running on your local
machine. The debugger needs to connect to the python process.

Anyhow, it's not hard to do once you know where to look. I managed to get
PyCharm debugging in about 15 minutes - most of that was spent downloading
the app for the first time.

Cheers
Andrew

On Wed, 6 May 2020 at 07:04, Clemens 
wrote:

> Hi Andrew,
>
> well, I would say, it's because I ever used it and it's okay for me. But
> which one would you recommend? And how to connect your favorite debugger
> with web2py? Never used another debugger for web2py.
>
> Regards
> Clemens
>
>
> On Tuesday, May 5, 2020 at 1:56:25 AM UTC+2, AGRogers wrote:
>>
>> Hi Clemens
>>
>> I definitely can't help you with this problem. Sorry. But I am interested
>> in why you use the online debugger and not something else?
>>
>> Thanks
>> Andrew
>>
>> On Mon, 4 May 2020 at 23:50, Clemens  wrote:
>>
>>> Hello Massimo,
>>>
>>> I hoped the latest web2py version would fix the problem. My current
>>> configuration is now:
>>> web2py version 2.20.4-stable+timestamp.2020.05.03.05.18.50, Running on
>>> Rocket 1.2.6, Python 3.6.9, Ubuntu 18.04., Firefox 75.0 (64-bit)
>>>
>>> But the online debugger still doesn't work. The debugger doesn't catch
>>> the breakpoint, set in my code. Instead, after waiting a few minutes I got
>>> the following new situation:
>>>
>>> [image: Screenshot_2020-05-04 interact.png]
>>>
>>> [image: Screenshot_2020-05-04 interact-02.png]
>>> Do you have any idea, how I can fix this?
>>>
>>> Best regards
>>> Clemens
>>>
>>>
>>> On Sunday, April 26, 2020 at 8:46:00 AM UTC+2, Massimo Di Pierro wrote:

 what browser?

 On Monday, 30 March 2020 13:23:57 UTC-7, Clemens wrote:
>
> Hello everybody!
>
> I've switched my web2py app from python2 to python3. The app itself
> works fine, but the web2py online debugger doesn't work anymore and is
> mostly freezing. Sometimes a get the following error message:
>
> Exception timeout: timeout('timed out',)
>
> Traceback (most recent call last): File
> "/usr/lib/python3.6/socket.py", line 586, in readinto return
> self._sock.recv_into(b) socket.timeout: timed out
>
> My configuration is as follows:
>
> web2py 2.19.1-stable+timestamp.2020.03.21.21.49.28 (Running on Rocket
> 1.2.6, Python 3.6.9), Ubuntu 18.04 LTS
>
> What do I have to change additionally that the online debugger is
> working under python3?
>
>
> Thanks a lot for any support!
>
>
> Best regards Clemens
>
 --
>>> 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/ccc32a55-4a15-4f88-9b0f-69326542b6f0%40googlegroups.com
>>> 
>>> .
>>>
>> --
> 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/73792fd3-310e-43e6-89d6-5f615e12546d%40googlegroups.com
> 
> .
>

-- 
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/CACWMBMOut2-NUb_fJvSme2QPHjGhy61TQjKRzsZPTecS%2BVUF4g%40mail.gmail.com.


Re: [web2py] Re: login after period of inactivity

2020-05-05 Thread Maurice Waka
I don't know what code I could show since the app is online, but in my
routes.py:

from fileutils import abspath
from languages import read_possible_languages

possible_languages = read_possible_languages(abspath('applications', app))
#
--
# NOTE! app - is an application based router's parameter with name of an
application. E.g.'welcome'
#
--

routers = {
app: dict(
default_language=possible_languages['default'][0],
languages=[lang for lang in possible_languages if lang != 'default']
)
}

On Tue, May 5, 2020 at 11:09 PM Jim S  wrote:

> Can you show some code?
>
> -Jim
>
> On Tuesday, May 5, 2020 at 1:38:29 PM UTC-5, Maurice Waka wrote:
>>
>> I notice this message after a period of inactivity. See attached.
>> The problem is that on clicking on the login link on the app on
>> pythonanywhere, I get an error: invalid view (default/user/load).
>> How can I resolve this?
>> 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 a topic in the
> Google Groups "web2py-users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/web2py/Px0b1zYX-Zg/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> web2py+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/web2py/541b05b3-02b7-4bc8-8773-f093a41bc1ce%40googlegroups.com
> 
> .
>

-- 
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/CALkNK54meaB2PLi2b7r0%3D-7KPxbYs0%3D1rdsjivxNdcF%3DP-CLjg%40mail.gmail.com.


Re: [web2py] Re: login after period of inactivity

2020-05-05 Thread Maurice Waka
Actually, I want to customize the code to get better feedback, and after
digging in I got this discussion


I just don't know where to exactly place this code, or get something better:

auth.messages.ajax_failed_authentication = DIV(H4(T('Your session has
expired')),
T('Please '),
A(T('login'),
  _href=auth.settings.login_url +
('?_next=' +
urllib.quote(request.env.http_web2py_component_location))
  if
request.env.http_web2py_component_location else ''),
T(' again to view this content.'),
_class='not-authorized alert alert-block')



On Tue, May 5, 2020 at 11:09 PM Jim S  wrote:

> Can you show some code?
>
> -Jim
>
> On Tuesday, May 5, 2020 at 1:38:29 PM UTC-5, Maurice Waka wrote:
>>
>> I notice this message after a period of inactivity. See attached.
>> The problem is that on clicking on the login link on the app on
>> pythonanywhere, I get an error: invalid view (default/user/load).
>> How can I resolve this?
>> 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 a topic in the
> Google Groups "web2py-users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/web2py/Px0b1zYX-Zg/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> web2py+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/web2py/541b05b3-02b7-4bc8-8773-f093a41bc1ce%40googlegroups.com
> 
> .
>

-- 
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/CALkNK55gawc7O47Evh8QUarrjz9QQ7%3DmHQuWp8p433ibQzxw8A%40mail.gmail.com.


[web2py] Anyone using Caddy for production deployment?

2020-05-05 Thread Valdeck Rowe
Playing with it now, and it appears to be so much simpler and less time 
intensive to get up and running...

-- 
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/d398bc76-a8a4-4c15-8e30-38c432cbda6f%40googlegroups.com.


[web2py] Re: Getting an error that ends in "No driver of supported ones %s is available" % str(self.drivers) RuntimeError: No driver of supported ones ('psycopg2',) is available

2020-05-05 Thread Valdeck Rowe
Thanks. 

This looks like it would most likely have worked for me. 

However I've moved away from Postgres for that project as it was mission 
critical and I was running out of time.

I may revisit at a later time.

Really appreciate the responses

Thanks again everyone.


On Sunday, April 19, 2020 at 4:10:21 AM UTC-5, Annet wrote:
>
> I had the same problem when installing web2py 2.19.1 on Mac OS X Catalina.
>
> I eventually solved the problem running the following code:
>
> Annets-Mini:~ me$ export PATH=/usr/local/Cellar/postgresql/12.1/bin/:$PATH
> Annets-Mini:~ me$ export LDFLAGS="-L/usr/local/opt/readline/lib"
> Annets-Mini:~ me$ export CPPFLAGS="-I/usr/local/opt/readline/include"
> Annets-Mini:~ me$ export 
> PKG_CONFIG_PATH="/usr/local/opt/readline/lib/pkgconfig"
> Annets-Mini:~ me$ export 
> LIBRARY_PATH=$LIBRARY_PATH:/usr/local/opt/openssl/lib/
> Annets-Mini:~ me$ pip install psycopg2
> Collecting psycopg2
>   Using cached psycopg2-2.8.4.tar.gz (377 kB)
> Installing collected packages: psycopg2
> Running setup.py install for psycopg2 ... done
> Successfully installed psycopg2-2.8.4
> Annets-Mini:~ me$
>
> Your using Linux but maybe this information points you in
> the right direction.
>
>
> 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/7b7bf63f-c043-4fc9-be4e-1c0aafbe0826%40googlegroups.com.