Re: [web2py] web2py 2.17.1

2018-08-11 Thread sandeep patel
Hello,
In  Version, 2.16.1-stable Plugins work fine when clicking on plugin web2py
administrative interface gives all information about the plugin, but in
2.17.1 gives Error.
is that bug or I am doing something wrong?
Version
web2py™ Version 2.17.1-stable+timestamp.2018.08.06.01.02.56
Python Python 3.6.2: C:\Program Files\Python36\python.exe (prefix:
C:\Program Files\Python36)Traceback

1.
2.
3.
4.
5.
6.

Traceback (most recent call last):
  File "C:\web2py\gluon\restricted.py", line 219, in restricted
exec(ccode, environment)
  File "C:\web2py\applications\admin\views\default/plugin.html", line
165, in 
path=[]
TypeError: sequence item 0: expected str instance, bytes found


Thanks,
Sandeep

On Sat, Aug 11, 2018 at 9:34 PM Nico Zanferrari  wrote:

> Hi,
>
> I've found that the style bug described in
> https://github.com/web2py/web2py/issues/1929 (due to bootstrap4 changes)
> is still present - at least with the Welcome app. I've already commented
> there.
>
> Also, the version on github is 2.17.1-stable+timestamp.2018.08.05.17.57.00
> , while on the website is 2.17.1-stable+timestamp.2018.08.06.01.02.56 . The
> different timestamps make the Admin app to suggest to upgrade to a
> non-existing new version if you install web2py using git Please, avoid
> it for the next release.
>
> Thank you,
> Nico
>
> Il giorno lun 6 ago 2018 alle ore 03:12 Massimo Di Pierro <
> massimo.dipie...@gmail.com> ha scritto:
>
>> Hello everybody,
>>
>> I released pyDAL 18.08 and web2py 2.17.1
>> They mostly contain bug fixes as well as better support for python 3 and
>> bootstrap 4 by default.
>> Thanks to all those who contributed!
>>
>> Please check them out and report any issue with them.
>>
>> I have a been a little slow checking this group because of lots of
>> traveling but I will do my best to catch up. :-)
>>
>> Massimo
>>
>> --
>> 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.
>> 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.
> 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.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] web2py 2.17.1

2018-08-11 Thread Nico Zanferrari
Hi,

I've found that the style bug described in
https://github.com/web2py/web2py/issues/1929 (due to bootstrap4 changes) is
still present - at least with the Welcome app. I've already commented there.

Also, the version on github is 2.17.1-stable+timestamp.2018.08.05.17.57.00
, while on the website is 2.17.1-stable+timestamp.2018.08.06.01.02.56 . The
different timestamps make the Admin app to suggest to upgrade to a
non-existing new version if you install web2py using git Please, avoid
it for the next release.

Thank you,
Nico

Il giorno lun 6 ago 2018 alle ore 03:12 Massimo Di Pierro <
massimo.dipie...@gmail.com> ha scritto:

> Hello everybody,
>
> I released pyDAL 18.08 and web2py 2.17.1
> They mostly contain bug fixes as well as better support for python 3 and
> bootstrap 4 by default.
> Thanks to all those who contributed!
>
> Please check them out and report any issue with them.
>
> I have a been a little slow checking this group because of lots of
> traveling but I will do my best to catch up. :-)
>
> Massimo
>
> --
> 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.
> 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.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Mysql Boolean Workaround

2018-08-11 Thread Anthony
Does it work if you replace db._adapter.types with 
db._adapter.dialect.types (the former is now an @property that points to 
the latter)?

Anthony

On Saturday, August 11, 2018 at 9:19:05 AM UTC-4, Emilio wrote:
>
> Hi,
> I have a website using the old release "web2py-R-2.9.12" and it works 
> relying on this workaround: 
>
> db._adapter.types = copy.copy(db._adapter.types)
> db._adapter.types['boolean']='TINYINT(1)'
> db._adapter.TRUE = 1
> db._adapter.FALSE = 0
>
> That I found here: 
> https://groups.google.com/forum/#!topic/web2py/IukqqZF_PPE
>
> But in the recent releases (I'm upgrading to the R-2.17.1), it gives this 
> error:
>
> [image: Schermata da 2018-08-09 11-37-04.png]
> It's there anything I can do without rewriting all the table definitions?
> Thanks
>

-- 
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.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Reloading components using JS

2018-08-11 Thread Anthony

>
> Controller:
>
>> def delete():
>> """
>> Deletes an external medic record in the database
>> :return:
>> """
>> from dao import DAOExternalMedic
>> DAOExternalMedic().delete(request.args[0])
>> session.flash = "Record deleted"
>> # response.js = "jQuery('#%s').reload()" % DivEnums.MAINGRID
>> url = URL('external_medics', 'w_manage.load')
>> response.js = "web2py_component('%s','%s');" % (url, DivEnums.MAINGRID)
>> redirect(URL('index'))
>> return
>>
>>
I think the problem is that you are doing a redirect before the function 
returns, so the JS code never makes it to the browser. Presumably the 
delete() function is called via Ajax, so why does it redirect to 'index' 
anyway?

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 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.
For more options, visit https://groups.google.com/d/optout.


[web2py] Mysql Boolean Workaround

2018-08-11 Thread Emilio
Hi,
I have a website using the old release "web2py-R-2.9.12" and it works 
relying on this workaround: 

db._adapter.types = copy.copy(db._adapter.types)
db._adapter.types['boolean']='TINYINT(1)'
db._adapter.TRUE = 1
db._adapter.FALSE = 0

That I found 
here: https://groups.google.com/forum/#!topic/web2py/IukqqZF_PPE

But in the recent releases (I'm upgrading to the R-2.17.1), it gives this 
error:

[image: Schermata da 2018-08-09 11-37-04.png] 
It's there anything I can do without rewriting all the table definitions?
Thanks

-- 
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.
For more options, visit https://groups.google.com/d/optout.


[web2py] Reloading components using JS

2018-08-11 Thread Luis Angulo

Hi, I've been using web2py for awhile, and I'm developing an application 
based on the use of components. I'm trying to reload a smartgrid component 
after a delete action in a controller.

Essentially, I have an SQLFORM.grid() that I use to display records in a db 
table, but because of customer requests I'm using modals and components 
instead of the built-in CRUD functionality in the form. I've added links 
with custom forms to do these actions, after which the grid is supposed to 
reload and reflect the recent changes made by the user, but the delete 
action doesn't reload the grid, unlike the rest.

Here's the code:

Controller:

> def delete():
> """
> Deletes an external medic record in the database
> :return:
> """
> from dao import DAOExternalMedic
> DAOExternalMedic().delete(request.args[0])
> session.flash = "Record deleted"
> # response.js = "jQuery('#%s').reload()" % DivEnums.MAINGRID
> url = URL('external_medics', 'w_manage.load')
> response.js = "web2py_component('%s','%s');" % (url, DivEnums.MAINGRID)
> redirect(URL('index'))
> return
>
>
DivEnums.MAINGRID = 'manage'. It's used in the component's div id tag, so 
it should work. Only it doesn't. The record is deleted and the 
response.flash message is displayed, yet the component doesn't reload to 
show the user the SQLFORM.grid reflecting the changes.

I've tried using the jQuery example from this section of the manual:

http://web2py.com/books/default/chapter/29/12/components-and-plugins#Reload-another-component

I don't use Javascript, so I'm really in the dark about how this part of 
the framework works beyond what's explained on the manual. I looked for a 
previous post about this issue but couldn't find much (I'm building the 
components from modules, not using the LOAD() helper). 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.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Re: web2py broken

2018-08-11 Thread BlueShadow
So I tried to connect on python. and it seems to work.
I wrote this tiny program:
import sqlite3
conn = sqlite3.connect('storage.sqlite')
print(conn)
c = conn.cursor()
c.close()
this is the output:

So I guess it has nothing to do with a corrupted database.

-- 
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.
For more options, visit https://groups.google.com/d/optout.