[web2py] Re: File upload/download over https freezes site

2015-07-29 Thread Niphlod
uhm, you left out some pretty specific details what resources has the 
server web2py is deployed on ? moreover, what's the size of the file ? and 
what code are you using to handle the upload? are you using the default 
'upload' Field or is it in conjunction with a 'blob' one to store the file 
on the database ?

On Wednesday, July 29, 2015 at 4:59:29 AM UTC+2, Dave wrote:
>
>
> I have this same behavior on multiple web2py servers.  If a large file is 
> being uploaded using a SQLFORM or downloaded using the default download 
> controller, over HTTPS, the entire web server becomes unresponsive until 
> the transfer is completed or cancelled.  However, I have no issues 
> uploading/downloading the same file over HTTP, which can also take several 
> minutes to complete, but the web server is still responsive during those 
> transfers.
>
> I am using the one-step deployment with Apache and a wildcard certificate 
> (RapidSSL).  Would switching to nginx or cherokee give better performance 
> for https file transfers, or is this likely an issue with the SSL 
> certificate format?  Or if the file transfers over HTTPS are too CPU 
> intensive, am i better off setting up multiple servers and a load balancer?
>
> Thanks!
> Dave R
>
>
>

-- 
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: sqlite3 locking

2015-07-29 Thread Niphlod
to alleviate the issues, recent sqlite builds feature a mode to activate 
that is called "WAL" , which you can read about at 
https://www.sqlite.org/wal.html .
you can enable it just executing PRAGMA journal_mode=WAL once in the 
database . if you want to do it in web2py, run this code just once

db.executesql("PRAGMA journal_mode=WAL;")


On Monday, July 27, 2015 at 2:35:54 PM UTC+2, jackso...@quantachrome.com 
wrote:
>
> In the web2py book chap 29: "Notice that in SQLite the database consists 
> of a single file. If it does not exist, it is created. This file is locked 
> every time it is accessed."   I assume access meant reading or writing the 
> database
>
> On Friday, July 24, 2015 at 4:52:26 PM UTC-4, jackso...@quantachrome.com 
> wrote:
>>
>> The docs say that web2py locks a sqlite3 database file always...even if 
>> just reading. Is there a way to circumvent this so that my database writing 
>> process does have to wait for web2py reading the 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.


[web2py] Re: Does web2py support reCAPTCHA v2?

2015-07-29 Thread Niphlod
there's recaptcha "v2" 
https://github.com/web2py/web2py/blob/master/gluon/tools.py#L971

On Saturday, July 25, 2015 at 10:06:54 PM UTC+2, Chris wrote:
>
> I recently got an email notifying me that Google is upgrading its captcha 
> to the new "no CAPTCHA" version. Does web2py support that by default? I 
> tried searching in the mailing list but couldn't find the right keywords. 
> 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: SQLFORM.widgets.options.widget(f, v, _disabled=True)

2015-07-29 Thread Annet
Hi Anthony,

Can't you just do:
>
> SQLFORM.widgets.options.widget(f, v, _disabled=True, _class='generic_widget 
> form-control')
>
> Yes , that solves the issue, thanks.

 

>
> The fourth argument to IS_IN_DB is the error message, so a lambda wouldn't 
> go there. Perhaps you meant for that to be in place of the third argument, 
> which is for the labels. But what is wrong with the current "labels" 
> argument -- does it not produce the labels you want?
>
>
In your first reply you said: or you could write a custom validator for the 
field that automatically replaces the submitted value with the field's 
default in case the submitted value is None.

I first thought I could adjust the IS_IN_DB validator to accomplish this, 
on second thoughts, I understand you meant
writing a custom validator just to replace the submitted value with the 
value that's already in the database. However,
your first solution solves the issue, so no neeed to write a custom 
validator.

Best,

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


[web2py] Re: XML helper mangles svg file with namespace prefixes

2015-07-29 Thread Anthony
The problem is not with the XML helper but with the way you are generating 
the SVG markup (you must do it without the "ns0" namespace). For tips on 
how to do it correctly, see 
http://stackoverflow.com/questions/3895951/create-svg-xml-document-without-ns0-namespace-using-python-elementtree.

Alternatively, you could manually remove the "ns0" namespace via:

svg = svg.replace('ns0:', '')

Anthony

On Tuesday, July 28, 2015 at 4:52:57 PM UTC-4, 
jackson.r...@quantachrome.com wrote:
>
> IN a controller if I return an svg that has full namspace prefixes 
> (default for the python xml package 'tostring' method )via the XML helper 
> it is mangled it beyond recognition. The same svg works in emacs as well as 
> loaded as a file in the bowser. ns0 ns1 etc namepsace  prefixes are verbose 
> but totally legit xml. I wish the python xml package did not add this stuff 
> ...but still web2py should be able to handle it.
>
> below is the start of the svg file in question Just to illustrate the 
> namespace prefixes I am talking about
>
> http://purl.org/dc/elements/1.1/"; xmlns:ns0="
> http://www.w3.org/2000/svg"; xmlns:ns1="
> http://www.inkscape.org/namespaces/inkscape"; xmlns:ns2="
> http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"; xmlns:ns4="
> http://creativecommons.org/ns#"; xmlns:ns6="http://www.w3.org/1999/xlink"; 
> xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"; 
> height="638.99463" id="svg4250" preserveAspectRatio="xMinYMin meet" 
> version="1.1" viewBox="0 0 907.35736 638.99463" width="907.35736" 
> ns2:docname="station1_flow.svg" ns1:version="0.47 r22583" 
> xml:space="preserve"> rdf:about="">image/svg+xmlhttp://purl.org/dc/dcmitype/StillImage"; /> /> id="Arrow1Lstart" orient="auto" refX="0.0" refY="0.0" 
> style="overflow:visible" ns1:stockid="Arrow1Lstart"> style="fill-rule:evenodd;stroke:#00;stroke-width:1.0pt;marker-start:none" 
> transform="scale(0.8) translate(12.5,0)" /> id="linearGradient5560"> style="stop-color:#84bde7;stop-opacity:1;" /> offset="1" style="stop-color:#67a4d0;stop-opacity:0;" 
> /> ns1:collect="always"> style="stop-color:#00;stop-opacity:1;" /> offset="1" style="stop-color:#00;stop-opacity:0;" />.
>

-- 
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: sqlite3 locking

2015-07-29 Thread jackson . read
thats once per database I assume. Can I put it in db.py to have it executed 
once?

On Friday, July 24, 2015 at 4:52:26 PM UTC-4, jackso...@quantachrome.com 
wrote:
>
> The docs say that web2py locks a sqlite3 database file always...even if 
> just reading. Is there a way to circumvent this so that my database writing 
> process does have to wait for web2py reading the 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.


[web2py] Re: sqlite3 locking

2015-07-29 Thread Niphlod
db.py is usually a model, so it gets executed once per request. 
Enabling WAL is a thing needed just one time only (that "setting" gets 
stored in the sqlite database file). When you "reopen" the file WAL is 
already been activated.
There is no other activity involved once the database file has been created 
and "WAL-enabled". As long as you don't create sqlite databases on the fly, 
I'd not put that piece of code anywhere. 
If you're in the need of something to assure when deploying a new app or a 
new db, you can make a "setup" controller that, once hit, enables WAL, but 
that's pretty much about it.

On Wednesday, July 29, 2015 at 3:15:25 PM UTC+2, jackso...@quantachrome.com 
wrote:
>
> thats once per database I assume. Can I put it in db.py to have it 
> executed once?
>
> On Friday, July 24, 2015 at 4:52:26 PM UTC-4, jackso...@quantachrome.com 
> wrote:
>>
>> The docs say that web2py locks a sqlite3 database file always...even if 
>> just reading. Is there a way to circumvent this so that my database writing 
>> process does have to wait for web2py reading the 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.


[web2py] Header name in grid single record view

2015-07-29 Thread Gael Princivalle
Hello all.

Is there a way to retrieve an header name in a grid single record view?
I've tried with .header without success.
{{if request.args and request.args[-3] == 'view':}}
{{=P(grid.view_form.record.field_name.header)}}: {{=P(grid.view_form.
record.field_name)}}
{{else:}}
{{=grid}}
{{pass}}


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: Header name in grid single record view

2015-07-29 Thread Anthony
The grid.view_form is just a SQLFORM with readonly=True, and its "record" 
attribute is just a Row object, which does not store any field labels. 
Instead, you can do db.mytable.field_name.label to get the label for each 
field.

Anthony

On Wednesday, July 29, 2015 at 9:32:32 AM UTC-4, Gael Princivalle wrote:
>
> Hello all.
>
> Is there a way to retrieve an header name in a grid single record view?
> I've tried with .header without success.
> {{if request.args and request.args[-3] == 'view':}}
> {{=P(grid.view_form.record.field_name.header)}}: {{=P(grid.view_form.
> record.field_name)}}
> {{else:}}
> {{=grid}}
> {{pass}}
>
>
> 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] How to display uploaded files

2015-07-29 Thread Selman Kocael
I can get uploaded files if i upload with SQLFORM or SQLFORM.factory via*
form.name.filename*. How can get all uploaded file names under 'upload'
directory? Is the only way to save the names to db?



-- 
Selman Kocael
İsabet Yayınları

-- 
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: How to display uploaded files

2015-07-29 Thread Anthony
web2py renames files uploaded via SQLFORM, so typically the new filenames 
are stored in the database so they can be associated with some other 
metadata in order to aid retrieval (possibly including the original 
filename).

You can of course read the list of filenames in any folder in Python via 
something like:

next(os.walk(os.path.join(request.folder, 'uploads'))[2]

Anthony

On Wednesday, July 29, 2015 at 10:29:57 AM UTC-4, xmarx wrote:
>
> I can get uploaded files if i upload with SQLFORM or SQLFORM.factory via* 
> form.name.filename*. How can get all uploaded file names under 'upload' 
> directory? Is the only way to save the names to db?
>
>
>
> -- 
> Selman Kocael
> İsabet Yayınları
>
> 

-- 
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] When will we have a "proper" forum ?

2015-07-29 Thread António Ramos
I hate google groups because its not easy to find help so people keep
asking the same question over and over again.
we should follow other ideas as Massimo said
Ideas we had, ideas we...

This one is very good as an example.
https://forums.meteor.com
A lot easier to learn from something like this...

Regards
António

-- 
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] When will we have a "proper" forum ?

2015-07-29 Thread Richard Vézina
It seems nice, maybe build with web2py!!

:)

Richard#

On Wed, Jul 29, 2015 at 10:59 AM, António Ramos 
wrote:

> I hate google groups because its not easy to find help so people keep
> asking the same question over and over again.
> we should follow other ideas as Massimo said
> Ideas we had, ideas we...
>
> This one is very good as an example.
> https://forums.meteor.com
> A lot easier to learn from something like this...
>
> Regards
> António
>
>  --
> 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: File upload/download over https freezes site

2015-07-29 Thread Dave
Actually, it looks like i was chasing the wrong issue... It wasn't https 
after all.

Everything seems to be working after changing this line in apache 
default.conf:

WSGIDaemonProcess web2py user=www-data group=www-data processes=1 threads=1


to:

WSGIDaemonProcess web2py user=www-data group=www-data processes=5 threads=15



Is there any reason not to change this default setting from one-step 
deployment?  Can I likely set these values higher based on my hardware?

Thanks again,
Dave

On Wednesday, 29 July 2015 02:52:20 UTC-6, Niphlod wrote:
>
> uhm, you left out some pretty specific details what resources has the 
> server web2py is deployed on ? moreover, what's the size of the file ? and 
> what code are you using to handle the upload? are you using the default 
> 'upload' Field or is it in conjunction with a 'blob' one to store the file 
> on the database ?
>
> On Wednesday, July 29, 2015 at 4:59:29 AM UTC+2, Dave wrote:
>>
>>
>> I have this same behavior on multiple web2py servers.  If a large file is 
>> being uploaded using a SQLFORM or downloaded using the default download 
>> controller, over HTTPS, the entire web server becomes unresponsive until 
>> the transfer is completed or cancelled.  However, I have no issues 
>> uploading/downloading the same file over HTTP, which can also take several 
>> minutes to complete, but the web server is still responsive during those 
>> transfers.
>>
>> I am using the one-step deployment with Apache and a wildcard certificate 
>> (RapidSSL).  Would switching to nginx or cherokee give better performance 
>> for https file transfers, or is this likely an issue with the SSL 
>> certificate format?  Or if the file transfers over HTTPS are too CPU 
>> intensive, am i better off setting up multiple servers and a load balancer?
>>
>> Thanks!
>> Dave R
>>
>>
>>

-- 
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: File upload/download over https freezes site

2015-07-29 Thread Dave
Sorry about that, here are those hardware details:

Ubuntu server 14.04.01
CPU: Intel Xenon X5660 @ 2.80Ghz (dual core)
RAM: 8GB


On Wednesday, July 29, 2015 at 10:00:47 AM UTC-6, Dave wrote:
>
> Actually, it looks like i was chasing the wrong issue... It wasn't https 
> after all.
>
> Everything seems to be working after changing this line in apache 
> default.conf:
>
> WSGIDaemonProcess web2py user=www-data group=www-data processes=1 threads=1
>
>
> to:
>
> WSGIDaemonProcess web2py user=www-data group=www-data processes=5 threads=15
>
>
>
> Is there any reason not to change this default setting from one-step 
> deployment?  Can I likely set these values higher based on my hardware?
>
> Thanks again,
> Dave
>
> On Wednesday, 29 July 2015 02:52:20 UTC-6, Niphlod wrote:
>>
>> uhm, you left out some pretty specific details what resources has the 
>> server web2py is deployed on ? moreover, what's the size of the file ? and 
>> what code are you using to handle the upload? are you using the default 
>> 'upload' Field or is it in conjunction with a 'blob' one to store the file 
>> on the database ?
>>
>> On Wednesday, July 29, 2015 at 4:59:29 AM UTC+2, Dave wrote:
>>>
>>>
>>> I have this same behavior on multiple web2py servers.  If a large file 
>>> is being uploaded using a SQLFORM or downloaded using the default download 
>>> controller, over HTTPS, the entire web server becomes unresponsive until 
>>> the transfer is completed or cancelled.  However, I have no issues 
>>> uploading/downloading the same file over HTTP, which can also take several 
>>> minutes to complete, but the web server is still responsive during those 
>>> transfers.
>>>
>>> I am using the one-step deployment with Apache and a wildcard 
>>> certificate (RapidSSL).  Would switching to nginx or cherokee give better 
>>> performance for https file transfers, or is this likely an issue with the 
>>> SSL certificate format?  Or if the file transfers over HTTPS are too CPU 
>>> intensive, am i better off setting up multiple servers and a load balancer?
>>>
>>> Thanks!
>>> Dave R
>>>
>>>
>>>

-- 
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] plugin for handsontable

2015-07-29 Thread Pablo Angulo
I have packaged a plugin with one possible use of the great library
handsontable:

http://www.web2pyslices.com/slice/show/2042/handsontable-plugin-for-a-spreadsheet

You may comment on the plugin as you want, but I specifically want to
ask if you find the following trick acceptable (or improvable):

The Handsontable plugin is used to load client side a potentially very
big table, and the data is stored by handsontable. I decided to suscribe
to the afterValidate event of the Handsontable object:

afterValidate:function(isValid,value,row,prop,source){
if(isValid){
override[[rowids[row], prop]] = value;
}
}

and record only the values that the user updates.
Close to the div that holds the table there is a form consisting of a
submit button and hidden field.
Then before the form is submitted, I stringify the object with all the
changes, and attach it to the hidden form field:

$('#submit').on('click', function(){
$('#override').val(JSON.stringify(override));
});

Back in web2py, I recover the changes by the user in this way:

import json as json_parser
override = json_parser.loads(request_vars.override)

Any comments would be appreciated.

-- 
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] Web2py admin page causing internal error (version 2.9.10)

2015-07-29 Thread Mark Li
I just upgraded my web2py version on Pythonanywhere from 2.7.4 to 2.9.10, 
so my live site can match my test site web2py version

This in turn has caused the admin page to start producing errors, so I am 
unable to look at error tickets (they will just produce more errors). 

I'm quite lost as to what I can do to fix this problem, as I can't even 
read the error tickets (it's just a continuing cycle of internal errors).

-- 
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: When will we have a "proper" forum ?

2015-07-29 Thread Anthony
Meteor is using Discourse  (self-hosted), as are 
a number of other open source communities, such as ReactJS, Mozilla, and 
ElasticSearch (also used by New Relic and How-To Geek).

I like it and even suggested it here 
 
as a possible alternative to Google Groups when the web interfaces stopped 
working, but I'm not sure it is really any more easily searched than Google 
Groups.

Anthony

On Wednesday, July 29, 2015 at 11:00:00 AM UTC-4, Ramos wrote:
>
> I hate google groups because its not easy to find help so people keep 
> asking the same question over and over again.
> we should follow other ideas as Massimo said 
> Ideas we had, ideas we...
>
> This one is very good as an example.
> https://forums.meteor.com
> A lot easier to learn from something like this...
>
> Regards
> António
>
>

-- 
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: When will we have a "proper" forum ?

2015-07-29 Thread Dave S


On Wednesday, July 29, 2015 at 8:00:00 AM UTC-7, Ramos wrote:
>
> I hate google groups because its not easy to find help so people keep 
> asking the same question over and over again.
>

I expect any system to include people asking the same question over and 
over again.  Many people jump in for a one-shot question, and don't search 
for previous answers.  Often newcomers don't know the terms to search for 
even if they think to look.
 

> we should follow other ideas as Massimo said 
> Ideas we had, ideas we...
>
> This one is very good as an example.
> https://forums.meteor.com
> A lot easier to learn from something like this...
>
>
Anything specific about that exceites your interest?

/dps
 

-- 
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: Web2py admin page causing internal error (version 2.9.10)

2015-07-29 Thread Dave S


On Wednesday, July 29, 2015 at 10:20:36 AM UTC-7, Mark Li wrote:
>
> I just upgraded my web2py version on Pythonanywhere from 2.7.4 to 2.9.10, 
> so my live site can match my test site web2py version
>
> This in turn has caused the admin page to start producing errors, so I am 
> unable to look at error tickets (they will just produce more errors). 
>
> I'm quite lost as to what I can do to fix this problem, as I can't even 
> read the error tickets (it's just a continuing cycle of internal errors).
>

You probably need to clear old sessions and old tickets out (back up the 
tickets, then clear the directory).  As I remember it, old sessions and old 
tickets were the two biggest sources of error loops.

/dps
 

-- 
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: When will we have a "proper" forum ?

2015-07-29 Thread Dave S


On Wednesday, July 29, 2015 at 10:46:42 AM UTC-7, Dave S wrote:
>
>
>
> On Wednesday, July 29, 2015 at 8:00:00 AM UTC-7, Ramos wrote:
>>
>> I hate google groups because its not easy to find help so people keep 
>> asking the same question over and over again.
>>
>
> I expect any system to include people asking the same question over and 
> over again.  Many people jump in for a one-shot question, and don't search 
> for previous answers.  Often newcomers don't know the terms to search for 
> even if they think to look.
>  
>
>> we should follow other ideas as Massimo said 
>> Ideas we had, ideas we...
>>
>> This one is very good as an example.
>> https://forums.meteor.com
>> A lot easier to learn from something like this...
>>
>>
> Anything specific about that exceites your interest?
>

Besides pictures instead of names being shown on the topic list?

/dps
 

-- 
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: XML helper mangles svg file with namespace prefixes

2015-07-29 Thread jackson . read
I followed the link given and used lxml package instead of xml and it 
works. lxml does not add the prefixes that xmk does. The lxml API is a 
superset of the xml API so I did not have to change the code much. BTW  I 
tried removing the ns0 prefix in the svg as per the suggestion the svg 
displays but the xlinks in it are no longer active

On Tuesday, July 28, 2015 at 4:52:57 PM UTC-4, jackso...@quantachrome.com 
wrote:
>
> IN a controller if I return an svg that has full namspace prefixes 
> (default for the python xml package 'tostring' method )via the XML helper 
> it is mangled it beyond recognition. The same svg works in emacs as well as 
> loaded as a file in the bowser. ns0 ns1 etc namepsace  prefixes are verbose 
> but totally legit xml. I wish the python xml package did not add this stuff 
> ...but still web2py should be able to handle it.
>
> below is the start of the svg file in question Just to illustrate the 
> namespace prefixes I am talking about
>
> http://purl.org/dc/elements/1.1/"; xmlns:ns0="
> http://www.w3.org/2000/svg"; xmlns:ns1="
> http://www.inkscape.org/namespaces/inkscape"; xmlns:ns2="
> http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"; xmlns:ns4="
> http://creativecommons.org/ns#"; xmlns:ns6="http://www.w3.org/1999/xlink"; 
> xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"; 
> height="638.99463" id="svg4250" preserveAspectRatio="xMinYMin meet" 
> version="1.1" viewBox="0 0 907.35736 638.99463" width="907.35736" 
> ns2:docname="station1_flow.svg" ns1:version="0.47 r22583" 
> xml:space="preserve"> rdf:about="">image/svg+xmlhttp://purl.org/dc/dcmitype/StillImage"; /> /> id="Arrow1Lstart" orient="auto" refX="0.0" refY="0.0" 
> style="overflow:visible" ns1:stockid="Arrow1Lstart"> style="fill-rule:evenodd;stroke:#00;stroke-width:1.0pt;marker-start:none" 
> transform="scale(0.8) translate(12.5,0)" /> id="linearGradient5560"> style="stop-color:#84bde7;stop-opacity:1;" /> offset="1" style="stop-color:#67a4d0;stop-opacity:0;" 
> /> ns1:collect="always"> style="stop-color:#00;stop-opacity:1;" /> offset="1" style="stop-color:#00;stop-opacity:0;" />.
>

-- 
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: Web2py admin page causing internal error (version 2.9.10)

2015-07-29 Thread Mark Li
I've run sessions2trash.py to remove all sessions, as well as remove all 
the files from the errors folder. Unfortunately I'm still getting the error 
loop. Should I do this for the admin app as well?

On Wednesday, July 29, 2015 at 10:52:06 AM UTC-7, Dave S wrote:
>
>
>
> On Wednesday, July 29, 2015 at 10:20:36 AM UTC-7, Mark Li wrote:
>>
>> I just upgraded my web2py version on Pythonanywhere from 2.7.4 to 2.9.10, 
>> so my live site can match my test site web2py version
>>
>> This in turn has caused the admin page to start producing errors, so I am 
>> unable to look at error tickets (they will just produce more errors). 
>>
>> I'm quite lost as to what I can do to fix this problem, as I can't even 
>> read the error tickets (it's just a continuing cycle of internal errors).
>>
>
> You probably need to clear old sessions and old tickets out (back up the 
> tickets, then clear the directory).  As I remember it, old sessions and old 
> tickets were the two biggest sources of error loops.
>
> /dps
>  
>

-- 
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: When will we have a "proper" forum ?

2015-07-29 Thread Anthony


> This one is very good as an example.
>> https://forums.meteor.com
>> A lot easier to learn from something like this...
>>
>>
> Anything specific about that exceites your interest?
>

For one thing, we would own the data/content.

-- 
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: Web2py admin page causing internal error (version 2.9.10)

2015-07-29 Thread Mark Li
I am looking at the errors for the admin (at the files), and I am getting a 
" name 'DEMO_MODE' is not defined"" error

On Wednesday, July 29, 2015 at 11:24:07 AM UTC-7, Mark Li wrote:
>
> I've run sessions2trash.py to remove all sessions, as well as remove all 
> the files from the errors folder. Unfortunately I'm still getting the error 
> loop. Should I do this for the admin app as well?
>
> On Wednesday, July 29, 2015 at 10:52:06 AM UTC-7, Dave S wrote:
>>
>>
>>
>> On Wednesday, July 29, 2015 at 10:20:36 AM UTC-7, Mark Li wrote:
>>>
>>> I just upgraded my web2py version on Pythonanywhere from 2.7.4 to 
>>> 2.9.10, so my live site can match my test site web2py version
>>>
>>> This in turn has caused the admin page to start producing errors, so I 
>>> am unable to look at error tickets (they will just produce more errors). 
>>>
>>> I'm quite lost as to what I can do to fix this problem, as I can't even 
>>> read the error tickets (it's just a continuing cycle of internal errors).
>>>
>>
>> You probably need to clear old sessions and old tickets out (back up the 
>> tickets, then clear the directory).  As I remember it, old sessions and old 
>> tickets were the two biggest sources of error loops.
>>
>> /dps
>>  
>>
>

-- 
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] Getting a demo_mode not defined error in admin (even though demo_mode defined in 0.py)

2015-07-29 Thread Mark Li
I am getting a very odd error in my admin app (2.9.10) on PythonAnywhere. I 
am getting the following error:

Traceback (most recent call last):
  File "/home/marladarla7/web2py/gluon/restricted.py", line 224, in 
restricted
exec ccode in environment
  File "applications/admin/models/0_imports.py", line 15, in 
from mercurial import ui, hg, cmdutil
  File "/home/marladarla7/web2py/gluon/custom_import.py", line 71, in 
custom_importer
return NATIVE_IMPORTER(oname, globals, locals, fromlist, level)
  File "mercurial.py", line 3, in 
if DEMO_MODE or MULTI_USER_MODE:
NameError: name 'DEMO_MODE' is not defined

I have checked 0.py model, and DEMO_MODE = False, so I have no idea why I 
am getting this error

This error started occurring after I unzipped the 2.9.10 web2py zip over my 
old install (2.7.4).

-- 
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: Web2py admin page causing internal error (version 2.9.10)

2015-07-29 Thread Dave S


On Wednesday, July 29, 2015 at 11:44:44 AM UTC-7, Mark Li wrote:
>
> I am looking at the errors for the admin (at the files), and I am getting 
> a " name 'DEMO_MODE' is not defined"" error
>
>
That doesn't ring any bells for me, although I'm currently on 2.11.2.  I 
think the step that required some extra effort for pydal 2.10.x.

/dps


 

> On Wednesday, July 29, 2015 at 11:24:07 AM UTC-7, Mark Li wrote:
>>
>> I've run sessions2trash.py to remove all sessions, as well as remove all 
>> the files from the errors folder. Unfortunately I'm still getting the error 
>> loop. Should I do this for the admin app as well?
>>
>> On Wednesday, July 29, 2015 at 10:52:06 AM UTC-7, Dave S wrote:
>>>
>>>
>>>
>>> On Wednesday, July 29, 2015 at 10:20:36 AM UTC-7, Mark Li wrote:

 I just upgraded my web2py version on Pythonanywhere from 2.7.4 to 
 2.9.10, so my live site can match my test site web2py version

 This in turn has caused the admin page to start producing errors, so I 
 am unable to look at error tickets (they will just produce more errors). 

 I'm quite lost as to what I can do to fix this problem, as I can't even 
 read the error tickets (it's just a continuing cycle of internal errors).

>>>
>>> You probably need to clear old sessions and old tickets out (back up the 
>>> tickets, then clear the directory).  As I remember it, old sessions and old 
>>> tickets were the two biggest sources of error loops.
>>>
>>> /dps
>>>  
>>>
>>

-- 
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 admin page causing internal error (version 2.9.10)

2015-07-29 Thread Richard Vézina
Did you update the admin app?

Also, if I remember there have been many correction over 2.10.x web2py
build... I would avoid the 2.10.x series for this reason... I remember
having testing and having found it not that stable and I stay with 2.9.5...

2.11.2 seems to work great...

Richard

On Wed, Jul 29, 2015 at 3:30 PM, Dave S  wrote:

>
>
> On Wednesday, July 29, 2015 at 11:44:44 AM UTC-7, Mark Li wrote:
>>
>> I am looking at the errors for the admin (at the files), and I am getting
>> a " name 'DEMO_MODE' is not defined"" error
>>
>>
> That doesn't ring any bells for me, although I'm currently on 2.11.2.  I
> think the step that required some extra effort for pydal 2.10.x.
>
> /dps
>
>
>
>
>> On Wednesday, July 29, 2015 at 11:24:07 AM UTC-7, Mark Li wrote:
>>>
>>> I've run sessions2trash.py to remove all sessions, as well as remove all
>>> the files from the errors folder. Unfortunately I'm still getting the error
>>> loop. Should I do this for the admin app as well?
>>>
>>> On Wednesday, July 29, 2015 at 10:52:06 AM UTC-7, Dave S wrote:



 On Wednesday, July 29, 2015 at 10:20:36 AM UTC-7, Mark Li wrote:
>
> I just upgraded my web2py version on Pythonanywhere from 2.7.4 to
> 2.9.10, so my live site can match my test site web2py version
>
> This in turn has caused the admin page to start producing errors, so I
> am unable to look at error tickets (they will just produce more errors).
>
> I'm quite lost as to what I can do to fix this problem, as I can't
> even read the error tickets (it's just a continuing cycle of internal
> errors).
>

 You probably need to clear old sessions and old tickets out (back up
 the tickets, then clear the directory).  As I remember it, old sessions and
 old tickets were the two biggest sources of error loops.

 /dps


>>>  --
> 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] Re: Web2py admin page causing internal error (version 2.9.10)

2015-07-29 Thread Richard Vézina
sorry I miss read... 2.9.10...

Why not 2.9.12...

Why not install 2.11.2??

Richard

On Wed, Jul 29, 2015 at 3:49 PM, Richard Vézina  wrote:

> Did you update the admin app?
>
> Also, if I remember there have been many correction over 2.10.x web2py
> build... I would avoid the 2.10.x series for this reason... I remember
> having testing and having found it not that stable and I stay with 2.9.5...
>
> 2.11.2 seems to work great...
>
> Richard
>
> On Wed, Jul 29, 2015 at 3:30 PM, Dave S  wrote:
>
>>
>>
>> On Wednesday, July 29, 2015 at 11:44:44 AM UTC-7, Mark Li wrote:
>>>
>>> I am looking at the errors for the admin (at the files), and I am
>>> getting a " name 'DEMO_MODE' is not defined""
>>> error
>>>
>>>
>> That doesn't ring any bells for me, although I'm currently on 2.11.2.  I
>> think the step that required some extra effort for pydal 2.10.x.
>>
>> /dps
>>
>>
>>
>>
>>> On Wednesday, July 29, 2015 at 11:24:07 AM UTC-7, Mark Li wrote:

 I've run sessions2trash.py to remove all sessions, as well as remove
 all the files from the errors folder. Unfortunately I'm still getting the
 error loop. Should I do this for the admin app as well?

 On Wednesday, July 29, 2015 at 10:52:06 AM UTC-7, Dave S wrote:
>
>
>
> On Wednesday, July 29, 2015 at 10:20:36 AM UTC-7, Mark Li wrote:
>>
>> I just upgraded my web2py version on Pythonanywhere from 2.7.4 to
>> 2.9.10, so my live site can match my test site web2py version
>>
>> This in turn has caused the admin page to start producing errors, so
>> I am unable to look at error tickets (they will just produce more 
>> errors).
>>
>> I'm quite lost as to what I can do to fix this problem, as I can't
>> even read the error tickets (it's just a continuing cycle of internal
>> errors).
>>
>
> You probably need to clear old sessions and old tickets out (back up
> the tickets, then clear the directory).  As I remember it, old sessions 
> and
> old tickets were the two biggest sources of error loops.
>
> /dps
>
>
  --
>> 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: File upload/download over https freezes site

2015-07-29 Thread Niphlod
I dropped off the apache train too soon to have any issues with it, but 
frankly, given the total sum of issues encountered so far on the forums, 
I'm starting to think that we'd need to "officially discontinue" our apache 
support.. may be total lack of luck in setting it up or very biased 
perspective, or total lack of internal knowledge but it seems that every 
problem that pops up with deployments have apache as the common ground.

looks like this is the commit to be blamed

https://github.com/web2py/web2py/commit/2a062a2ff5aa1e07e7bfcfdbf36b7f72e8aac5b4

I don't know the specifics around it but if it acts like it suggests, 1 
thread and 1 process as a total sum aren't really worth of a production 
deployment.


On Wednesday, July 29, 2015 at 6:00:47 PM UTC+2, Dave wrote:
>
> Actually, it looks like i was chasing the wrong issue... It wasn't https 
> after all.
>
> Everything seems to be working after changing this line in apache 
> default.conf:
>
> WSGIDaemonProcess web2py user=www-data group=www-data processes=1 threads=1
>
>
> to:
>
> WSGIDaemonProcess web2py user=www-data group=www-data processes=5 threads=15
>
>
>
> Is there any reason not to change this default setting from one-step 
> deployment?  Can I likely set these values higher based on my hardware?
>
> Thanks again,
> Dave
>
> On Wednesday, 29 July 2015 02:52:20 UTC-6, Niphlod wrote:
>>
>> uhm, you left out some pretty specific details what resources has the 
>> server web2py is deployed on ? moreover, what's the size of the file ? and 
>> what code are you using to handle the upload? are you using the default 
>> 'upload' Field or is it in conjunction with a 'blob' one to store the file 
>> on the database ?
>>
>> On Wednesday, July 29, 2015 at 4:59:29 AM UTC+2, Dave wrote:
>>>
>>>
>>> I have this same behavior on multiple web2py servers.  If a large file 
>>> is being uploaded using a SQLFORM or downloaded using the default download 
>>> controller, over HTTPS, the entire web server becomes unresponsive until 
>>> the transfer is completed or cancelled.  However, I have no issues 
>>> uploading/downloading the same file over HTTP, which can also take several 
>>> minutes to complete, but the web server is still responsive during those 
>>> transfers.
>>>
>>> I am using the one-step deployment with Apache and a wildcard 
>>> certificate (RapidSSL).  Would switching to nginx or cherokee give better 
>>> performance for https file transfers, or is this likely an issue with the 
>>> SSL certificate format?  Or if the file transfers over HTTPS are too CPU 
>>> intensive, am i better off setting up multiple servers and a load balancer?
>>>
>>> Thanks!
>>> Dave R
>>>
>>>
>>>

-- 
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] OpenLDAP and TLS auth example, please

2015-07-29 Thread backseat
Does anyone have an example of configuring an OpenLDAP TLS connection for 
authentication?

I've tried:

auth.settings.login_methods.append(ldap_auth(
server='my.ldap.server',
base_dn='ou=users,dc=my,dc=ldap,dc=server',
secure=True,
port=389,
))

...but that fails with "Invalid login" (using a valid, existing OpenLDAP 
username/pw).

Removing the "secure=True" gets me a "confidentiality required" back from 
the LDAP server.

Removing the "port=389" uses port 636 (as I'd expect); the OpenLDAP+TLS 
server is definitely listening on 389.

Thoughts? Suggestions?

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: File upload/download over https freezes site

2015-07-29 Thread Dave
That would be good to know.  Nothing in the web2py docs suggests that 
Apache should not be used in production, it actually seems more like the 
default since it is the first discussed in the documentation and it's used 
in the one-step production deployment. 

The line of code in question is also in the one-step deployment script here:
http://web2py.googlecode.com/hg/scripts/setup-web2py-ubuntu.sh


On Wednesday, 29 July 2015 14:32:19 UTC-6, Niphlod wrote:
>
> I dropped off the apache train too soon to have any issues with it, but 
> frankly, given the total sum of issues encountered so far on the forums, 
> I'm starting to think that we'd need to "officially discontinue" our apache 
> support.. may be total lack of luck in setting it up or very biased 
> perspective, or total lack of internal knowledge but it seems that every 
> problem that pops up with deployments have apache as the common ground.
>
> looks like this is the commit to be blamed
>
>
> https://github.com/web2py/web2py/commit/2a062a2ff5aa1e07e7bfcfdbf36b7f72e8aac5b4
>
> I don't know the specifics around it but if it acts like it suggests, 1 
> thread and 1 process as a total sum aren't really worth of a production 
> deployment.
>
>
> On Wednesday, July 29, 2015 at 6:00:47 PM UTC+2, Dave wrote:
>>
>> Actually, it looks like i was chasing the wrong issue... It wasn't https 
>> after all.
>>
>> Everything seems to be working after changing this line in apache 
>> default.conf:
>>
>> WSGIDaemonProcess web2py user=www-data group=www-data processes=1 threads=1
>>
>>
>> to:
>>
>> WSGIDaemonProcess web2py user=www-data group=www-data processes=5 threads=15
>>
>>
>>
>> Is there any reason not to change this default setting from one-step 
>> deployment?  Can I likely set these values higher based on my hardware?
>>
>> Thanks again,
>> Dave
>>
>> On Wednesday, 29 July 2015 02:52:20 UTC-6, Niphlod wrote:
>>>
>>> uhm, you left out some pretty specific details what resources has 
>>> the server web2py is deployed on ? moreover, what's the size of the file ? 
>>> and what code are you using to handle the upload? are you using the default 
>>> 'upload' Field or is it in conjunction with a 'blob' one to store the file 
>>> on the database ?
>>>
>>> On Wednesday, July 29, 2015 at 4:59:29 AM UTC+2, Dave wrote:


 I have this same behavior on multiple web2py servers.  If a large file 
 is being uploaded using a SQLFORM or downloaded using the default download 
 controller, over HTTPS, the entire web server becomes unresponsive until 
 the transfer is completed or cancelled.  However, I have no issues 
 uploading/downloading the same file over HTTP, which can also take several 
 minutes to complete, but the web server is still responsive during those 
 transfers.

 I am using the one-step deployment with Apache and a wildcard 
 certificate (RapidSSL).  Would switching to nginx or cherokee give better 
 performance for https file transfers, or is this likely an issue with the 
 SSL certificate format?  Or if the file transfers over HTTPS are too CPU 
 intensive, am i better off setting up multiple servers and a load balancer?

 Thanks!
 Dave R




-- 
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: view and edit on same page

2015-07-29 Thread Alex Glaros
Hi Jorge,

are there two views?  view and new-view (formula _general)?

thanks,

Alex

-- 
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: view and edit on same page

2015-07-29 Thread Dave S


On Wednesday, July 29, 2015 at 4:34:30 PM UTC-7, Alex Glaros wrote:
>
> Hi Jorge,
>
> are there two views?  view and new-view (formula _general)?
>

I would expect a view for the page (page.html) and the view for the 
component (formula_general.load, as listed in the onclick(), and a view for 
the cancellation component (nada.load).  On clicking a button, one or the 
other of the .load files will replace the DIV (in the page.html view)  with 
the id == 'panel'.

/dps


-- 
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: When will we have a "proper" forum ?

2015-07-29 Thread Dave S


On Wednesday, July 29, 2015 at 10:45:22 AM UTC-7, Anthony wrote:
>
> Meteor is using Discourse  (self-hosted), as 
> are a number of other open source communities, such as ReactJS, Mozilla, 
> and ElasticSearch (also used by New Relic and How-To Geek).
>
> I like it and even suggested it here 
>  
> as a possible alternative to Google Groups when the web interfaces stopped 
> working, but I'm not sure it is really any more easily searched than Google 
> Groups.
>
> Anthony
>
>

Note that Google Groups posts can show up in a general Google search (I 
don't know if they will in Yahoo/Bing), without any additional work on our 
part.  For something self-hosted, we'd have to make sure the archive was 
crawled to have that coverage.

/dps
 

> On Wednesday, July 29, 2015 at 11:00:00 AM UTC-4, Ramos wrote:
>>
>> I hate google groups because its not easy to find help so people keep 
>> asking the same question over and over again.
>> we should follow other ideas as Massimo said 
>> Ideas we had, ideas we...
>>
>> This one is very good as an example.
>> https://forums.meteor.com
>> A lot easier to learn from something like this...
>>
>> Regards
>> António
>>
>>

-- 
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] Will database callbacks be appended each time model is changed?

2015-07-29 Thread Thomas Sitter
Hello,

I'm adding an _after_update callback to my table in db.py using:

def myfunc(s,f):
  #do stuff
  return False

db.tt._after_update.append(myfunc)

My question is whether this will continuously append this method every time 
a database table is modified.

I'm asking because I had a similar issue when creating the initial auth 
users/groups in db.py. I had to wrap the code in the following logic to 
prevent them being added multiple times

if not db().select(db.auth_user.ALL).first():
  group_1 = auth.add_group('group1', 'group1 employees')
  ...


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: view and edit on same page

2015-07-29 Thread JorgeH
yes.

The first view, lets call it formula. 

for this example, just a tiny button with a pencil on it

  




It calls the controler called 'formula_general'

def formula_general():



   fields = ['nombre']
   record = session.formula

   form = SQLFORM(db.formulas, record, fields=fields)
   request.post_vars.id = session.formula

if form.process().accepted:
   response.flash = 'actualizado'
   redirect(request.env.http_web2py_component_location, client_side=True
)# Need it to reload the main page after editing fields, so the change are 
reflected instantly.
   elif form.errors:
   response.flash = 'favor revisar'
  

return dict(form=form)




in the new view (formula _general.load) just showing the form and nothing 
else (don't extend layout.html) :

 


 {{=form.custom.widget.nombre}}  {{=form.custom.submit}}   Cancelar 

Here you show the form (in this example Its a one field form, plus a Cancel 
button if the user decides not to edit. Change is showed instantly.

In the event that the users clic on 'cancel', then I created a controller 
just for that, called 'nada'   (spanish for 'nothing')
That controller just returns nothing, thus hiding the form (it could be 
done via jquery though. I just find it easier to use a controller:


 


# turns screen or div blank (for when user clics  on 'cancel'


def nada():
return ''








On Wednesday, July 29, 2015 at 6:34:30 PM UTC-5, Alex Glaros wrote:
>
> Hi Jorge,
>
> are there two views?  view and new-view (formula _general)?
>
> thanks,
>
> Alex
>

-- 
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: view and edit on same page

2015-07-29 Thread JorgeH
Exactly, 

Just as Dave S says. 
;)

On Wednesday, July 29, 2015 at 9:18:10 PM UTC-5, Dave S wrote:
>
>
>
> On Wednesday, July 29, 2015 at 4:34:30 PM UTC-7, Alex Glaros wrote:
>>
>> Hi Jorge,
>>
>> are there two views?  view and new-view (formula _general)?
>>
>
> I would expect a view for the page (page.html) and the view for the 
> component (formula_general.load, as listed in the onclick(), and a view for 
> the cancellation component (nada.load).  On clicking a button, one or the 
> other of the .load files will replace the DIV (in the page.html view)  with 
> the id == 'panel'.
>
> /dps
>
>
>

-- 
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 admin page causing internal error (version 2.9.10)

2015-07-29 Thread Mark Li
I've updated to version 2.11.2, and the problem still persists. I've 
deleted all errors, cache, and sessions for both admin app and "myapp"

I am getting the following traceback when I look in the admin/errors files:

Traceback (most recent call last):
  File "/home/marladarla7/web2py/
gluon/restricted.py", line 224, in restricted
exec ccode in environment
  File "applications/admin/models/0_imports.py", line 15, in 
from mercurial import ui, hg, cmdutil
  File "/home/marladarla7/web2py/gluon/custom_import.py", line 71, in 
custom_importer
return NATIVE_IMPORTER(oname, globals, locals, fromlist, level)
  File "mercurial.py", line 3, in 
if DEMO_MODE or MULTI_USER_MODE:
NameError: name 'DEMO_MODE' is not defined

I have checked 0.py model, and DEMO_MODE = False, so I have no idea why I 
am getting this error

On Wednesday, July 29, 2015 at 12:52:54 PM UTC-7, Richard wrote:
>
> sorry I miss read... 2.9.10...
>
> Why not 2.9.12...
>
> Why not install 2.11.2??
>
> Richard
>
> On Wed, Jul 29, 2015 at 3:49 PM, Richard Vézina  > wrote:
>
>> Did you update the admin app?
>>
>> Also, if I remember there have been many correction over 2.10.x web2py 
>> build... I would avoid the 2.10.x series for this reason... I remember 
>> having testing and having found it not that stable and I stay with 2.9.5...
>>
>> 2.11.2 seems to work great...
>>
>> Richard
>>
>> On Wed, Jul 29, 2015 at 3:30 PM, Dave S 
>> > wrote:
>>
>>>
>>>
>>> On Wednesday, July 29, 2015 at 11:44:44 AM UTC-7, Mark Li wrote:

 I am looking at the errors for the admin (at the files), and I am 
 getting a " name 'DEMO_MODE' is not defined"" 
 error


>>> That doesn't ring any bells for me, although I'm currently on 2.11.2.  I 
>>> think the step that required some extra effort for pydal 2.10.x.
>>>
>>> /dps
>>>
>>>
>>>  
>>>
 On Wednesday, July 29, 2015 at 11:24:07 AM UTC-7, Mark Li wrote:
>
> I've run sessions2trash.py to remove all sessions, as well as remove 
> all the files from the errors folder. Unfortunately I'm still getting the 
> error loop. Should I do this for the admin app as well?
>
> On Wednesday, July 29, 2015 at 10:52:06 AM UTC-7, Dave S wrote:
>>
>>
>>
>> On Wednesday, July 29, 2015 at 10:20:36 AM UTC-7, Mark Li wrote:
>>>
>>> I just upgraded my web2py version on Pythonanywhere from 2.7.4 to 
>>> 2.9.10, so my live site can match my test site web2py version
>>>
>>> This in turn has caused the admin page to start producing errors, so 
>>> I am unable to look at error tickets (they will just produce more 
>>> errors). 
>>>
>>> I'm quite lost as to what I can do to fix this problem, as I can't 
>>> even read the error tickets (it's just a continuing cycle of internal 
>>> errors).
>>>
>>
>> You probably need to clear old sessions and old tickets out (back up 
>> the tickets, then clear the directory).  As I remember it, old sessions 
>> and 
>> old tickets were the two biggest sources of error loops.
>>
>> /dps
>>  
>>
>  -- 
>>> 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+un...@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] favicon.ico

2015-07-29 Thread Александр Остыловский
Hello!
I replaced the files favicon.ico and favicon.png on the site  and nothing 
has changed. Why is that?
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] How to use the HTML tags in slugs created using CKEditor?

2015-07-29 Thread mishra
 Hi, 
My name's Mishra and I just started using Web2Py. I have some basic 
knowledge in coding (HTML, PHP, CSS and Python.) I don't usually write on 
forum as answers for most questions are already somewhere on the net, but I 
don't figure the solution for this problem despite of my efforts. 
I know there have been many questions on many forum created around these 
topics, but I'm yet to find what I am looking for. 
Thanks by advance for any help or comment. 

*This is my goal: *
My goal is to make a very basic wiki with a rich text editor in it. 
Everything works until the point where the program shows the content of the 
page. Instead of showing the intended format, it shows the HTML tags. For 
what I understand, it is suppose to do so to assure security. 
I will be the sole user of this wiki, so I don't care much about injection. 
I found the HTML helpers, particularly the XML() which looks to be the 
solution to my problem. 

*There is the problem: *
I can't seem to figure out where to put the XML() tag that will make the 
HTML code works. 

*There are the steps I took so far: *
I reinstalled Web2Py (it's not an installation, but you see what I mean.) 
I created a new application which I named ''wikidemo.'' 

I used the wiki coming with Web2Py. So I modified the index of 
''default.py'' controller, following the Wiki section of the Overview of 
the Documentation for Web2Py (
http://www.web2py.com/book/default/chapter/03#The-built-in-web2py-wiki): 

*def index(): return auth.wiki() *
For the rich text editor, I decided to use CKEditor. 
I downloaded CKEditor through the plugin repository. (
http://127.0.0.1:8000/admin/default/plugins/wikidemo) 

Following that, I added to my model ''db.py'': 


*from plugin_ckeditor import CKEditor ckeditor = CKEditor(db) 
ckeditor.define_tables() *

As it was written on the package page of CKEditor (
http://www.web2pyslices.com/slice/show/1952/) 

I wasn't sure what I was suppose to make of the ''Basic Usage'' section. 
Looking over the internet, I found that adding the following to my 
''db.py'': 

*auth.wiki(resolve=False) db.wiki_page.body.widget = ckeditor.widget *

Made that CKEditor was showing in the body section of the form used to 
create new slug and that it added the right html tags for what I wanted to 
do in the source code. 
Once created, however, the page shows the html tags instead of showing the 
intended format. 

There are the steps I took to settle the problem: 
My first thought was to put the XML() it in the ''default/index.html'' 
view. In the middle of the document there is this part: 

*{{elif 'content' in globals():}} {{=content}} *

I thought changing this for 


*{{elif 'content' in globals():}} {{=XML(content, sanitize=False)}} *
But it didn't work. As in, it showed the same thing as if I hadn't add 
anything.

I also though using TAG on the ''content'' variable, but it didn't work 
either (probably because the variable is not a string.) 

My next thought was to find where is the ''content'' variable is created (I 
understand that it is a variable, if it is not, please tell me) and to add 
the XML() around the variables taken from my database to create the pages, 
so the content created would be formatted the right way. 

Except I don't know where or how the content of ''content'' is created, nor 
if it is the right way to do what I intend to do (, nor if it is even 
possible to do that kind of thing...) 

Another solution might be to parse the text so that the HTML tags are 
replaced by XML tags... Even then, I am not sure if it would work. 

Thanks by advance for any help/comment and for the time you took to read 
all this, 

Mishra. 

P.S.: I don't see how it could be related, but I use a Ubuntu installed on 
an USB key for this project. 

P.P.S: Web2Py is an incredible program and the community seems to be very 
helpful (it's already been a lot for me.) Thank a lot to everyone.

-- 
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] ExtendLogin not working

2015-07-29 Thread Marlysson Silva

I'm trying to implement two types of login ( email + password and social 
login )

I'm using the ExtendLogin(auth,LinkedinAcount(),signals=['token'])

Just that it show me:

form.components.append(self.alt_login_form.login_form())
'LinkedInAccount' object has no attribute 'login_form'


Login method via linkedin isn't implemented this method(login_form) in the 
web2py?

-- 
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] Autocomplete widget issue on IBM system i DB2

2015-07-29 Thread Maurizio Brilli
Hi everybody.

I think I found an issue in the DB2 adapter. This is the scenario:

I have a field in a table with the following two attributes:

*db.table1.field.requires=IS_EMPTY_OR(IS_IN_DB(db, db.table2.id, 
'%(description)s, null=None)*

*db.table1.field.widget = SQLFORM.widgets.autocomplete(*
* request, db.table2.description, id_field=db.table2.id, 
limitby=(0,10), min_length=2)*

The "requires" attribute is supposed to be necessary because I accept null 
values in this field, otherwise it would not allow me to leave the field 
empty.

The problem is that, when using the autocomplete widget on a record with 
null db.table1.field, the DB2 adapter attempts to issue a SELECT statement 
like: 

"SELECT LIBRARY.TABLE.description FROM LIBRARY.TABLE WHERE 
(LIBRARY.TABLE.id = NULL)", which is syntactically wrong on DB2 (the right 
syntax is "...WHERE ... *IS* NULL").

I tried to follow the code to see if I could fix the generation of the SQL 
statement, but that goes beyond my ability and knowledge of web2py.

I found a workaround, though, that i suggest you to consider as a fix to 
the Autocomplete widget inside sqlhtml.py:

around line 707, in case of a self-referencing field (like the one I am 
working on), I changed this line:

record = self.db(
self.fields[1] == value).select(self.fields[0]).first()

to:

record = self.db(
self.fields[1] == value).select(self.fields[0]).first()* if 
value != '' else None*

I suggest it as a fix because it's a time and resource waste to query the 
database for a record with null id, beside my need to "workaround" the 
mistaken behaviour of the DB2 sql adapter.

This is just my opinion. I'd like to know what you think about it.

Ciao
Maurizio

-- 
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: File upload/download over https freezes site

2015-07-29 Thread admin
Sorry about that, here are those details:

Ubuntu server 14.04.01
CPU: Intel Xenon X5660 @ 2.80Ghz (dual core)
RAM: 8GB

The last file i tested was 50MB (web2py should be able to handle up to 
2GB?)  

Here are the models and controllers:

db.define_table('mytable',
Field('file','upload'))

def upload_test():
form=SQLFORM(db.mytable).process()
return dict(form=form)

def download():
return response.download(request,db)


Also worth noting, it does NOT bog down the server if i download the file 
through the admin panel over https:
https://.../appadmin/download/db/mytable.file.b8a8b0d7e3766c74.355f45465f3037323731355f4e4f544553203030312e746966.pdf

but it does become unresponsive (until finished) if i upload through admin 
panel:
https://../appadmin/insert/db/mytable


Let me know if you need any other details.  The server doesn't seem to be 
maxing out on CPU on memory usage during the file transfer (watching top 
processes in linux). Thanks for your quick response!

Dave


On Wednesday, July 29, 2015 at 2:52:20 AM UTC-6, Niphlod wrote:
>
> uhm, you left out some pretty specific details what resources has the 
> server web2py is deployed on ? moreover, what's the size of the file ? and 
> what code are you using to handle the upload? are you using the default 
> 'upload' Field or is it in conjunction with a 'blob' one to store the file 
> on the database ?
>
> On Wednesday, July 29, 2015 at 4:59:29 AM UTC+2, Dave wrote:
>>
>>
>> I have this same behavior on multiple web2py servers.  If a large file is 
>> being uploaded using a SQLFORM or downloaded using the default download 
>> controller, over HTTPS, the entire web server becomes unresponsive until 
>> the transfer is completed or cancelled.  However, I have no issues 
>> uploading/downloading the same file over HTTP, which can also take several 
>> minutes to complete, but the web server is still responsive during those 
>> transfers.
>>
>> I am using the one-step deployment with Apache and a wildcard certificate 
>> (RapidSSL).  Would switching to nginx or cherokee give better performance 
>> for https file transfers, or is this likely an issue with the SSL 
>> certificate format?  Or if the file transfers over HTTPS are too CPU 
>> intensive, am i better off setting up multiple servers and a load balancer?
>>
>> Thanks!
>> Dave R
>>
>>
>>

-- 
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: Auth_user dynamic cascading registration fields

2015-07-29 Thread Massimo Di Pierro
The problem is that what you want to do cannot be resolved server side. You 
want the team dropdown to depend on the section, the section dropdown to 
depend on the department, and the department dropdown to depend on the 
factory.

There is no web2py syntax to do this because there is no way to get it done 
without some client-side JS. In fact the way I would do it is create a JSON 
object with all the dependencies, cache it, serve is static file, and use 
it to populate the dropdown on change of the previous dropdown using JS.

Massimo


On Tuesday, 28 July 2015 17:30:18 UTC-5, Wabbajack wrote:
>
> I have created a *factory,department,section and team* table in the 
> database 
> and a *factory* is on a *one to many* relationship with *department*
> a *department* is on a *one to many* relationship with* section*
> a *section* is on a *one to many* relationship with* team*
>  
> *Table names*
> factory = portal_factory
> department = portal_department
> section = portal_section
> team = portal_team
>  
> *db.py codes*
> ## *Factory*
> db.define_table('portal_factory',
> Field('name', notnull=True , required=True,unique=True)
> )
> ## *Department*
> db.define_table('portal_department',
>
> Field('factory_id',db.portal_factory,notnull=True,required=True,requires=IS_IN_DB(db,
> db.portal_factory.id,'%(name)s')),
> Field('name',notnull=True,required=True,unique=True)
> )
> ## *Section*
> db.define_table('portal_section',
>
> Field('department_id',db.portal_department,notnull=True,required=True,requires=IS_IN_DB(db,
> db.portal_department.id,'%(name)s')),
> Field('name', notnull=True, required=True, unique=True),
> )
> ## *Team*
> db.define_table('portal_team',
>
> Field('section_id',db.portal_section,notnull=True,required=True,requires=IS_IN_DB(db,
> db.portal_section.id,'%(name)s')),
> Field('name', notnull=True, required=True, unique=True),
> )
>  
> ## This is the tricky part  
> ##i want to dynamically make an option list in the *t_department based on 
> the selected t_factory*
> ##i want to dynamically make an option list in the* t_section based on 
> the selected t_department*
> ##i want to dynamically make an option list in the* t_team based on the 
> selected t_section*
>  
> ## Extra fields on auth_user for registration 
> auth.settings.extra_fields['auth_user']=[
> Field('t_factory','reference portal_factory',label='Factory',notnull = 
> True,required = True,requires=IS_IN_DB(db, db.portal_factory.id
> ,'%(name)s')),
> Field('t_department','reference 
> portal_department',label='Department',notnull = True,required = 
> True,requires=IS_IN_DB(db, db.portal_department.id,'%(name)s')),
> Field('t_section','reference portal_section',label='Section',notnull = 
> True,required = True,requires=IS_IN_DB(db, db.portal_section.id
> ,'%(name)s')),
> Field('t_team','reference portal_team',label='Team',notnull = 
> True,required = True,requires=IS_IN_DB(db, db.portal_team.id,'%(name)s')),
> ]
>  
> i have an attached file where this what i want to happen upon registration
>  
> Upon registration if i select *factory* *A *there are different *department 
> *selections in the dropdown (dropdown.png)
> same as if i select *factory B *there are different *department *selections 
> in the dropdown (dropdown2.png)
> this setup will just follow for *department *to *section *and *section *to 
> *team*
>  
> Thank you in advance for your help...More power to web2py
>  
>  
>

-- 
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: plugin for handsontable

2015-07-29 Thread Massimo Di Pierro
Fantastic. I a big fun of handontable.

On Wednesday, 29 July 2015 11:59:27 UTC-5, Pablo Angulo wrote:
>
>  I have packaged a plugin with one possible use of the great library 
> handsontable:
>
>
> http://www.web2pyslices.com/slice/show/2042/handsontable-plugin-for-a-spreadsheet
>
> You may comment on the plugin as you want, but I specifically want to ask 
> if you find the following trick acceptable (or improvable):
>
> The Handsontable plugin is used to load client side a potentially very big 
> table, and the data is stored by handsontable. I decided to suscribe to the 
> afterValidate event of the Handsontable object:
>
> afterValidate:function(isValid,value,row,prop,source){
> if(isValid){
> override[[rowids[row], prop]] = value;
> }
> }
>
> and record only the values that the user updates.
> Close to the div that holds the table there is a form consisting of a 
> submit button and hidden field.
> Then before the form is submitted, I stringify the object with all the 
> changes, and attach it to the hidden form field:
>
> $('#submit').on('click', function(){
> $('#override').val(JSON.stringify(override));
> });
>
> Back in web2py, I recover the changes by the user in this way:
>
> import json as json_parser
> override = json_parser.loads(request_vars.override)
>
> Any comments would be appreciated.
>  

-- 
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 admin page causing internal error (version 2.9.10)

2015-07-29 Thread Mark Li
Deleting all the .pyc files from the web2py directory seems to have done
the trick.

On Wed, Jul 29, 2015 at 8:31 PM, Mark Li  wrote:

> I've updated to version 2.11.2, and the problem still persists. I've
> deleted all errors, cache, and sessions for both admin app and "myapp"
>
> I am getting the following traceback when I look in the admin/errors files:
>
> Traceback (most recent call last):
>   File "/home/marladarla7/web2py/
> gluon/restricted.py", line 224, in restricted
> exec ccode in environment
>   File "applications/admin/models/0_imports.py", line 15, in 
> from mercurial import ui, hg, cmdutil
>   File "/home/marladarla7/web2py/gluon/custom_import.py", line 71, in
> custom_importer
> return NATIVE_IMPORTER(oname, globals, locals, fromlist, level)
>   File "mercurial.py", line 3, in 
> if DEMO_MODE or MULTI_USER_MODE:
> NameError: name 'DEMO_MODE' is not defined
>
> I have checked 0.py model, and DEMO_MODE = False, so I have no idea why I
> am getting this error
>
> On Wednesday, July 29, 2015 at 12:52:54 PM UTC-7, Richard wrote:
>>
>> sorry I miss read... 2.9.10...
>>
>> Why not 2.9.12...
>>
>> Why not install 2.11.2??
>>
>> Richard
>>
>> On Wed, Jul 29, 2015 at 3:49 PM, Richard Vézina 
>> wrote:
>>
>>> Did you update the admin app?
>>>
>>> Also, if I remember there have been many correction over 2.10.x web2py
>>> build... I would avoid the 2.10.x series for this reason... I remember
>>> having testing and having found it not that stable and I stay with 2.9.5...
>>>
>>> 2.11.2 seems to work great...
>>>
>>> Richard
>>>
>>> On Wed, Jul 29, 2015 at 3:30 PM, Dave S  wrote:
>>>


 On Wednesday, July 29, 2015 at 11:44:44 AM UTC-7, Mark Li wrote:
>
> I am looking at the errors for the admin (at the files), and I am
> getting a " name 'DEMO_MODE' is not defined""
> error
>
>
 That doesn't ring any bells for me, although I'm currently on 2.11.2.
 I think the step that required some extra effort for pydal 2.10.x.

 /dps




> On Wednesday, July 29, 2015 at 11:24:07 AM UTC-7, Mark Li wrote:
>>
>> I've run sessions2trash.py to remove all sessions, as well as remove
>> all the files from the errors folder. Unfortunately I'm still getting the
>> error loop. Should I do this for the admin app as well?
>>
>> On Wednesday, July 29, 2015 at 10:52:06 AM UTC-7, Dave S wrote:
>>>
>>>
>>>
>>> On Wednesday, July 29, 2015 at 10:20:36 AM UTC-7, Mark Li wrote:

 I just upgraded my web2py version on Pythonanywhere from 2.7.4 to
 2.9.10, so my live site can match my test site web2py version

 This in turn has caused the admin page to start producing errors,
 so I am unable to look at error tickets (they will just produce more
 errors).

 I'm quite lost as to what I can do to fix this problem, as I can't
 even read the error tickets (it's just a continuing cycle of internal
 errors).

>>>
>>> You probably need to clear old sessions and old tickets out (back up
>>> the tickets, then clear the directory).  As I remember it, old sessions 
>>> and
>>> old tickets were the two biggest sources of error loops.
>>>
>>> /dps
>>>
>>>
>>  --
 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+un...@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 a topic in the
> Google Groups "web2py-users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/web2py/Z84QlkT6MqE/unsubscribe.
> To unsubscribe from this group and all its topics, 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: Will database callbacks be appended each time model is changed?

2015-07-29 Thread Anthony
auth.add_group() actually does a database insert, so you don't want to keep 
repeating it on every request (actually, I would probably move that code 
out of the app altogether, as it really only needs to be run once ever).

Specifying the after update callback, on the other hand, does not affect 
the database at all -- it simply tells the DAL what to do after a database 
update. In fact, you need this to run on every request because it is part 
of the model definition (for the same reason you need to run the associated 
db.define_table() on every request).

Anthony

On Wednesday, July 29, 2015 at 10:59:59 PM UTC-4, Thomas Sitter wrote:
>
> Hello,
>
> I'm adding an _after_update callback to my table in db.py using:
>
> def myfunc(s,f):
>   #do stuff
>   return False
>
> db.tt._after_update.append(myfunc)
>
> My question is whether this will continuously append this method every 
> time a database table is modified.
>
> I'm asking because I had a similar issue when creating the initial auth 
> users/groups in db.py. I had to wrap the code in the following logic to 
> prevent them being added multiple times
>
> if not db().select(db.auth_user.ALL).first():
>   group_1 = auth.add_group('group1', 'group1 employees')
>   ...
>
>
> 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: Getting a demo_mode not defined error in admin (even though demo_mode defined in 0.py)

2015-07-29 Thread Mark Li
 I upgraded to version 2.11.2, but the error was still occurring. I deleted 
all the .pyc files from the web2py directory and this seems to have solved 
the problem.

On Wednesday, July 29, 2015 at 12:06:46 PM UTC-7, Mark Li wrote:
>
> I am getting a very odd error in my admin app (2.9.10) on PythonAnywhere. 
> I am getting the following error:
>
> Traceback (most recent call last):
>   File "/home/marladarla7/web2py/gluon/restricted.py", line 224, in 
> restricted
> exec ccode in environment
>   File "applications/admin/models/0_imports.py", line 15, in 
> from mercurial import ui, hg, cmdutil
>   File "/home/marladarla7/web2py/gluon/custom_import.py", line 71, in 
> custom_importer
> return NATIVE_IMPORTER(oname, globals, locals, fromlist, level)
>   File "mercurial.py", line 3, in 
> if DEMO_MODE or MULTI_USER_MODE:
> NameError: name 'DEMO_MODE' is not defined
>
> I have checked 0.py model, and DEMO_MODE = False, so I have no idea why I 
> am getting this error
>
> This error started occurring after I unzipped the 2.9.10 web2py zip over 
> my old install (2.7.4).
>

-- 
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: OpenLDAP and TLS auth example, please

2015-07-29 Thread backseat
Hmm, we may have an LDAP server issue. Ignore for now; sorry for the noise.

-- 
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] Is it possible to translate data in SQLFORM.grid?

2015-07-29 Thread Gael Princivalle
Hello all.

Is it possible to translate data in SQLFORM.grid?

MODEL:
db.define_table('fruits',
Field('name', type='string'),
format='%(name)s')

db.define_table('cake',
Field('name', type='string'),
Field('fruit', 'reference fruits', requires = IS_IN_DB(db, 
db.fruits.id, '%(name)s'), represent=lambda id, r: db.fruits[id].name))

CONTROLLER:
grid=SQLFORM.grid(db.cake)

VIEW:
{{=grid}}

In the fruits table, names are in english, for example "Apple".

Is it possible to set for this field in the grid automatic traductions like 
T()?

In this case for example I would like to have in an Italian page "Mela" 
instead of "Apple".

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.