Re: [web2py] Re: 2.18.1 is OUT

2019-02-24 Thread Lovedie JC
Having trouble with download page:
See attached.

On Mon, 25 Feb 2019 at 07:57, Alex Glaros  wrote:

> am on Windows
>
> --
> 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: Custom Delimiters Broken in 2.18.1?

2019-02-24 Thread Massimo Di Pierro
Damn you are right. I am releasing 2.18.2 with a fix.

On Sunday, 24 February 2019 18:31:27 UTC-8, Limedrop wrote:
>
>
> Hi there,
>
> I think the custom template delimiters are broken in 2.18.1.  Here's my 
> test code and the exception I'm getting:
>
>
> CONTROLLER
> def index():
> response.delimiters = ('') 
> return dict(message=T('Welcome!'))
> 
> VIEW - index.html
> {{extend 'layout.html'}}
>  Note that each column needs at least {{minCards}} 
> cards.
>
> EXCEPTION 
> File "\web2py2.18.1\web2py\gluon\restricted.py", line 230, in restricted
> sys.excepthook(etype, evalue, tb) File 
> "c:\Users\Playtech\Documents\Development\web2py2.18.1\web2py\applications\app\views\default\index.html",
>  
> line 2, in 
> NameError: name 'minCards' is not defined
>
>
> Or have I done something wrong?
>
> 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.


Re: [web2py] Re: Xml use in python 3.6

2019-02-24 Thread Massimo Di Pierro
Very strange. Will check asap.

On Sunday, 24 February 2019 16:57:07 UTC-8, Lovedie JC wrote:
>
> I tried with the new updated web2py 2.18 but still get the same issue.
> Any help as to how to use xml here (also with yatl)?
> Regards
>
> On Thu, 21 Feb 2019 at 10:55, Massimo Di Pierro <
> massimo.dipie...@gmail.com> wrote:
>
>> The issue is fixed in https://github.com/web2py/yatl and it will go away 
>> in web2py as soon as we switch
>>
>> On Monday, 18 February 2019 18:54:38 UTC-8, Maurice Waka wrote:
>>>
>>> Hallo. 
>>> I created this issue in github but no response so far. 
>>> "xml() in python 3.6 · Issue #2096 · web2py/web2py" 
>>> https://github.com/web2py/web2py/issues/2096
>>
>> -- 
>> 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: customizing submit button in SQLFORM() - works partially

2019-02-24 Thread Massimo Di Pierro
Try reduce the scope of the JS

form = SQLFORM(db.inquiry, submit_button = 'Explore', 
_class="myform").process()

and use

var button = jQuery('.myform input[type=submit]');

On Sunday, 24 February 2019 16:53:08 UTC-8, Vlad wrote:
>
> I have the following line in the controller:
>
> form = SQLFORM(db.inquiry, submit_button = 'Explore').process()
>
> the view has the following: 
>
>{{=form}}
>
>$('input:submit[value=Explore]').attr('style', "'width:400px; 
> max-width:100%;'");
>$('input:submit[value=Explore]').attr('role', "'button'");
>$('input:submit[value=Explore]').append("");
>$('input:submit[value=Explore]').addClass('btn btn-light btn-lg 
> btn-block');
>
>
> so it works partially: the classes (the last line in the scrip) are added, 
> so it displays a proper button. But everything else is not picked up - 
>
> Any ideas on what's wrong / missing? 
>
>

-- 
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: creating a db table doesn't actually create a table (sqllite)

2019-02-24 Thread Massimo Di Pierro
How do you know the table has not been created? 
Do you have database/*.table files?
If this is a new app and you are sure the tables are not created, try 
delete those files.

On Sunday, 24 February 2019 15:58:20 UTC-8, Vlad wrote:
>
> When I define a table in db.py - it's just fine. But if I create a new 
> file - the admin interface picks it up, i.e. tells me that this model is 
> creating the table, but the table is not actually created. What would cause 
> such a difference?? It's really strange, as in other projects I define 
> tables in various files, not in db, and it has never been a problem for me. 
> I can't detect any difference - 
>

-- 
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: 2.18.1 is OUT

2019-02-24 Thread Alex Glaros
am on Windows

-- 
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: 2.18.1 is OUT

2019-02-24 Thread Rahul
Hi Alex,
I got the same reportlab platypus import error on my machine only 
when I installed PIL package over existing reportlab installation. To 
rectify this I had to remove PIL from my VPS (Debian) also reportlab and 
then reinstall pillow (PIL fork) and reportlab again to fix this issue. 
Hope this helps.

*Congratulations! to web2py community for bringing in the new framework.* Keep 
bringing it on.. :-) 

*Once small concern* - I am sure that the web2py manual is updated however 
how about renaming the manual file to web2py version as we have been 
seeing. For example instead of "*web2py_manual_5th*"  we can rename it to "
*web2py_manual_2.18.x.pdf*". This will remove the ambiguity that the manual 
is old one and not updated. What do you think ? 

Regards,

*Rahul*

On Monday, February 25, 2019 at 8:56:45 AM UTC+5:30, 黄祥 wrote:
>
> perhaps you should use web2py source then install reportlab manually
> ref:
> https://www.reportlab.com/opensource/installation
>
> best regards,
> stifan
>

-- 
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: 2.18.1 is OUT

2019-02-24 Thread 黄祥
perhaps you should use web2py source then install reportlab manually
ref:
https://www.reportlab.com/opensource/installation

best regards,
stifan

-- 
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: 2.18.1 is OUT

2019-02-24 Thread Alex Glaros
in default.py:

from reportlab.platypus import *

produces the following error:

 (ImportError('No module named 
reportlab.platypus',), )Version
web2py™ Version 2.18.1-stable+timestamp.2019.02.24.06.24.15Traceback

1.
2.
3.
4.
5.
6.
7.
8.
9.

Traceback (most recent call last):
  File "C:\alex\alt_w2p_03\web2py_win\web2py\gluon\restricted.py", line 219, in 
restricted
exec(ccode, environment)
  File 
"C:/alex/alt_w2p_03/web2py_win/web2py/applications/engagement_squared/controllers/default.py"
 
,
 line 21073, in 
from reportlab.platypus import *
  File "C:\alex\alt_w2p_03\web2py_win\web2py\gluon\custom_import.py", line 104, 
in custom_importer
raise ImportError(e1, import_tb)  # there an import error in the module
ImportError: (ImportError('No module named reportlab.platypus',), )

In file: 
C:\alex\alt_w2p_03\web2py_win\web2py\applications\engagement_squared\controllers/default.py

1.

 at 0AF57338, file 
"C:\alex\alt_w2p_03\web2py_win\web2py\applications\engagement_squared\controllers/default.py",
 line 11>


thanks,

Alex Glaros

-- 
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] Custom Delimiters Broken in 2.18.1?

2019-02-24 Thread Limedrop

Hi there,

I think the custom template delimiters are broken in 2.18.1.  Here's my 
test code and the exception I'm getting:


CONTROLLER
def index():
response.delimiters = ('') 
return dict(message=T('Welcome!'))

VIEW - index.html
{{extend 'layout.html'}}
 Note that each column needs at least {{minCards}} 
cards.

EXCEPTION 
File "\web2py2.18.1\web2py\gluon\restricted.py", line 230, in restricted
sys.excepthook(etype, evalue, tb) File 
"c:\Users\Playtech\Documents\Development\web2py2.18.1\web2py\applications\app\views\default\index.html",
 
line 2, in 
NameError: name 'minCards' is not defined


Or have I done something wrong?

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: off topic - npm for visualization dependencies and set up

2019-02-24 Thread 黄祥
in your local desktop
- first you need to have nodejs installed either from distro repo or from 
official site (https://nodejs.org/en/download/)
- then just follow the step according to what written on that github 

- make your code (orgchart.js) inside web2py app mine is under : 
~/web2py/applications/your_web2py_app/static

so there will be :
~/web2py/applications/your_web2py_app/static/node_modules
~/web2py/applications/your_web2py_app/static/package.json

- for using the js in web2py think you can embed it on views or controllers 
(your choice)
- pack your web2py app


in python anywhere
- unpack your web2py app using admin

best regards,
stifan

-- 
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: 2.18.1 is OUT

2019-02-24 Thread 黄祥
$ uname
Darwin
$ python -V
Python 3.7.2

Traceback (most recent call last):
  File "/Users/sugizo/project/python/web2py/gluon/restricted.py", line 219, 
in restricted
exec(ccode, environment)
  File 
"/Users/sugizo/project/python/web2py/applications/test/models/db_schema_0_auth.py",
 
line 9, in 
custom_auth_table = db[auth.settings.table_user_name]
  File 
"/Users/sugizo/project/python/web2py/gluon/packages/dal/pydal/base.py", 
line 666, in __getitem__
return self.__getattr__(str(key))
  File 
"/Users/sugizo/project/python/web2py/gluon/packages/dal/pydal/base.py", 
line 672, in __getattr__
return self.lazy_define_table(tablename, *fields, **kwargs)
  File 
"/Users/sugizo/project/python/web2py/gluon/packages/dal/pydal/base.py", 
line 624, in lazy_define_table
polymodel=polymodel)
  File 
"/Users/sugizo/project/python/web2py/gluon/packages/dal/pydal/adapters/base.py",
 
line 798, in create_table
return self.migrator.create_table(*args, **kwargs)
  File 
"/Users/sugizo/project/python/web2py/gluon/packages/dal/pydal/migrator.py", 
line 279, in create_table
query), table)
  File 
"/Users/sugizo/project/python/web2py/gluon/packages/dal/pydal/migrator.py", 
line 488, in log
logfile.write(to_bytes(message))
  File 
"/Users/sugizo/project/python/web2py/gluon/packages/dal/pydal/helpers/classes.py",
 
line 544, in write
self.data += data
TypeError: can only concatenate str (not "bytes") to str

any idea ?

thx n best regards,
stifan

-- 
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] off topic - npm for visualization dependencies and set up

2019-02-24 Thread Alex Glaros
Need someone to clarify fundamental concepts. Looking at some visualization 
tools such as orgChart.js 
(https://github.com/dabeng?tab=overview=2019-01-01=2019-01-31), 
requirements include npm installed (and gulp build). I don't how npm works.

If I want orgChart to work on my pythonAnywhere web2py site, can someone 
please explain what needs to be on my desktop for testing, and what needs 
to be uploaded to pythonAnywhere? What folders do they go in?

Am not familiar with Node.js. If I have to have that on my desktop and on 
pythonAnywhere to build javaScript for orgChart.js, does that mean it's 
also available for regular database work if I find any further use for it 
such as non-ACID transactions and searches?

thanks,

Alex Glaros

-- 
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: Xml use in python 3.6

2019-02-24 Thread Lovedie JC
I tried with the new updated web2py 2.18 but still get the same issue.
Any help as to how to use xml here (also with yatl)?
Regards

On Thu, 21 Feb 2019 at 10:55, Massimo Di Pierro 
wrote:

> The issue is fixed in https://github.com/web2py/yatl and it will go away
> in web2py as soon as we switch
>
> On Monday, 18 February 2019 18:54:38 UTC-8, Maurice Waka wrote:
>>
>> Hallo.
>> I created this issue in github but no response so far.
>> "xml() in python 3.6 · Issue #2096 · web2py/web2py"
>> https://github.com/web2py/web2py/issues/2096
>
> --
> 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] customizing submit button in SQLFORM() - works partially

2019-02-24 Thread Vlad
I have the following line in the controller:

form = SQLFORM(db.inquiry, submit_button = 'Explore').process()

the view has the following: 

   {{=form}}
   
   $('input:submit[value=Explore]').attr('style', "'width:400px; 
max-width:100%;'");
   $('input:submit[value=Explore]').attr('role', "'button'");
   $('input:submit[value=Explore]').append("");
   $('input:submit[value=Explore]').addClass('btn btn-light btn-lg 
btn-block');
   

so it works partially: the classes (the last line in the scrip) are added, 
so it displays a proper button. But everything else is not picked up - 

Any ideas on what's wrong / missing? 

-- 
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] creating a db table doesn't actually create a table (sqllite)

2019-02-24 Thread Vlad
When I define a table in db.py - it's just fine. But if I create a new file 
- the admin interface picks it up, i.e. tells me that this model is 
creating the table, but the table is not actually created. What would cause 
such a difference?? It's really strange, as in other projects I define 
tables in various files, not in db, and it has never been a problem for me. 
I can't detect any difference - 

-- 
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: Problem Pickling Session

2019-02-24 Thread Leonel Câmara
I used to have this error when I used Apache, my solution was simply to 
stop using apache, just use nginx and uwsgi and the problem just goes away. 
Alternatively you can clear your cookies or use a private browser window to 
access the app via https.  

-- 
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: 2.18.1 is OUT

2019-02-24 Thread Leonel Câmara
Great job everyone.

If you're getting your web2py directly from git remember to run "git 
submodule update --init --recursive" again to get the new yatl submodule.

-- 
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.