[web2py] Re: JQuery floatThead floating table header

2019-12-09 Thread Mark
Never mind, I just found the solution. The code need to be changed to "var 
$table = $('table');"


On Monday, December 9, 2019 at 1:42:34 PM UTC-5, Mark wrote:
>
> Hello,
>
> I try to use the following JQuery code in Web2py 2.18.3 or 2.4.5, but it 
> didn't work. I hope that the table header is fixed/floating, and I am not 
> sure if there is a better way to do it in web2py. The link to 
> jquery.floatThead is https://mkoryak.github.io/floatThead/. Any help 
> would be appreciated.
>
> web2py_ajax.html
> response.files.insert(0,URL('static','js/jquery.floatThead.js'))
>
> var $table = $('.web2py_table');
> $table.floatThead();
>
> 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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/4774fe65-5954-4363-9a12-ae724982b8c9%40googlegroups.com.


[web2py] JQuery floatThead floating table header

2019-12-09 Thread Mark
Hello,

I try to use the following JQuery code in Web2py 2.18.3 or 2.4.5, but it 
didn't work. I hope that the table header is fixed/floating, and I am not 
sure if there is a better way to do it in web2py. The link to 
jquery.floatThead is https://mkoryak.github.io/floatThead/. Any help would 
be appreciated.

web2py_ajax.html
response.files.insert(0,URL('static','js/jquery.floatThead.js'))

var $table = $('.web2py_table');
$table.floatThead();

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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/808da2e4-b554-4033-8048-6e826ba48ebd%40googlegroups.com.


[web2py] Azure Connection

2019-10-29 Thread Mark Billion
So, my connection string is: db = 
DAL('mysql://user:p...@my-server.database.windows.net/myDb',pool_size=5).

I get no connectivity.  Any help 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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/5a0c18d7-b218-4cc7-8513-28cce9f6e3d0%40googlegroups.com.


[web2py] ADA DECISION

2019-10-08 Thread Mark Billion
All ~ Long time asker here (thanks Anthony and Massimo for all your patient 
responses).  

FWIW, I did want to drop everyone a line about the Dominos Supreme Court 
appeal (Im a lawyer by trade).  The Court of Appeals for the 9th Circuit 
(it's basically the western quarter of the US per here 
<http://ca9.uscourts.gov/judicial_council/what_is_the_ninth_circuit.php>) 
has held that all business websites must be ADA compliant or you could wind 
up paying substantial attorney's fees to the person suing you.  This may or 
may not hold in other parts of the country and frankly, we don't really 
know what the requirements are at this time, especially for entirely 
virtual businesses.  That said, it is always good practice to be AA 
complaint with the *Web Content Accessibility Guidelines (WCAG) 2.0.  *

*Please note, this is not legal advice but just a pay it forward note from 
someone who got a lot of help on these forums!*

*Mark*

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/c373a033-9763-4c5c-b8b7-ee4267704395%40googlegroups.com.


[web2py] Re: xmlrpc python3 error

2019-10-07 Thread Mark
I submitted the bug report to the github. 

Thank you very much.

On Sunday, October 6, 2019 at 5:29:31 PM UTC-4, Dave S wrote:
>
>
>
> On Friday, September 27, 2019 at 6:39:00 AM UTC-7, Mark wrote:
>>
>> I am using either Rocket or Azure, and get the same error.
>>
>> Yes, there is a ticket, which I didn't realize before:
>>
>> Traceback (most recent call last):
>>   File "R:\web2py\gluon\restricted.py", line 219, in restricted
>> exec(ccode, environment)
>>   File "R:\web2py\applications\myapp\models\db.py", line 321, in 
>> '')
>>   File "R:\web2py\gluon\tools.py", line 884, in __init__
>> self.request_vars = request and request.vars or current.request.vars
>>   File "R:\web2py\gluon\globals.py", line 316, in vars
>> self.parse_all_vars()
>>   File "R:\web2py\gluon\globals.py", line 287, in parse_all_vars
>> for key, value in iteritems(self.post_vars):
>>   File "R:\web2py\gluon\globals.py", line 308, in post_vars
>> self.parse_post_vars()
>>   File "R:\web2py\gluon\globals.py", line 244, in parse_post_vars
>> dpost = cgi.FieldStorage(fp=body, environ=env, keep_blank_values=1)
>>   File "c:\python37\lib\cgi.py", line 491, in __init__
>> self.read_single()
>>   File "c:\python37\lib\cgi.py", line 682, in read_single
>> self.read_binary()
>>   File "c:\python37\lib\cgi.py", line 704, in read_binary
>> self.file.write(data)
>>   File "c:\python37\lib\tempfile.py", line 481, in func_wrapper
>> return func(*args, **kwargs)
>> TypeError: write() argument must be str, not bytes
>>
>>
>> Thanks!
>>
>
> This looks like a place where something got missed in the Py3 work.  I 
> suspect in cgi.py, maybe because testing used a uwsgi setup.  But I'm not 
> ready to go into to it at this time.   Try filing a bug report at  <
> https://github.com/web2py>
>
> Also, make sure we know what the front-end and middle-ware parts of the 
> configuration are.
>
> /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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/056030fd-2b6a-4161-9a81-3e47880627de%40googlegroups.com.


[web2py] Re: How can I disable SQLFORM.factory() form button after clicking once?

2019-09-27 Thread Mark
Change the '{{=qtnBtn}}' into 'input', it should work. I guess 
the reference is wrong (not dynamic).


On Friday, September 27, 2019 at 2:24:43 PM UTC-4, mostwanted wrote:
>
> Hey @Mark, thanks for replying but none of the solutions are working! I 
> fixed disabled & replaced attr() with prop() & ultimately with hide() but 
> nothing seems to be working!
>
> On Friday, September 27, 2019 at 7:09:39 PM UTC+2, Mark wrote:
>>
>> 'disbled' should be 'disabled'. If it doesn't work, I think you can try 
>> to use hide(), or prop('disabled', true)
>>
>>
>> On Friday, September 27, 2019 at 6:48:54 AM UTC-4, mostwanted wrote:
>>>
>>> I'm using SQLFORM.factory() to capture a specific detail but i want it 
>>> to be submitted once, to avoid the mistaking of possibly submitting it 
>>> again I want the button to be disabled immediately after the first 
>>> submission. I tried this below but it's not working, how can i make it 
>>> work??
>>>
>>> *CONTROLLER*
>>> def invoice():
>>> ref=SQLFORM.factory(Field('Quotation_reference',label=SPAN('Quotation 
>>> Reference', _style="font-weight: bold;"), widget = lambda field, value: 
>>> SQLFORM.widgets.string.widget(field, value, _class='my-string', _id=
>>> 'quote_number', _placeholder='N:B; Always remember to enter & submit 
>>> the quotation number first & always enter it once!')))
>>> 
>>> qtnBtn=ref.element('input',_type='submit')
>>>
>>> if request.vars.Quotation_reference is None:
>>> ref2=''
>>> else:
>>> session.ref2=request.vars.Quotation_reference
>>> 
>>> return locals()
>>>
>>> *VIEW*
>>> {{extend 'layout.html'}}
>>> 
>>> $(document).ready(function(){
>>> $('{{=qtnBtn}}').click(function(){
>>> $('{{=qtnBtn}}').attr('disbled', true);
>>> });
>>> });
>>> 
>>>
>>> {{=ref}}
>>>
>>>
>>> Regards;
>>>
>>> Mostwanted 
>>>
>>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/9bc5df74-2a24-4ac7-b27f-1c1f2e00b629%40googlegroups.com.


[web2py] Re: How can I disable SQLFORM.factory() form button after clicking once?

2019-09-27 Thread Mark
'disbled' should be 'disabled'. If it doesn't work, I think you can try to 
use hide(), or prop('disabled', true)


On Friday, September 27, 2019 at 6:48:54 AM UTC-4, mostwanted wrote:
>
> I'm using SQLFORM.factory() to capture a specific detail but i want it to 
> be submitted once, to avoid the mistaking of possibly submitting it again I 
> want the button to be disabled immediately after the first submission. I 
> tried this below but it's not working, how can i make it work??
>
> *CONTROLLER*
> def invoice():
> ref=SQLFORM.factory(Field('Quotation_reference',label=SPAN('Quotation 
> Reference', _style="font-weight: bold;"), widget = lambda field, value: 
> SQLFORM.widgets.string.widget(field, value, _class='my-string', _id=
> 'quote_number', _placeholder='N:B; Always remember to enter & submit the 
> quotation number first & always enter it once!')))
> 
> qtnBtn=ref.element('input',_type='submit')
>
> if request.vars.Quotation_reference is None:
> ref2=''
> else:
> session.ref2=request.vars.Quotation_reference
> 
> return locals()
>
> *VIEW*
> {{extend 'layout.html'}}
> 
> $(document).ready(function(){
> $('{{=qtnBtn}}').click(function(){
> $('{{=qtnBtn}}').attr('disbled', true);
> });
> });
> 
>
> {{=ref}}
>
>
> Regards;
>
> Mostwanted 
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/496a0cd4-30d2-47a3-98c8-a2627488333a%40googlegroups.com.


[web2py] Re: xmlrpc python3 error

2019-09-27 Thread Mark
I am using either Rocket or Azure, and get the same error.

Yes, there is a ticket, which I didn't realize before:

Traceback (most recent call last):
  File "R:\web2py\gluon\restricted.py", line 219, in restricted
exec(ccode, environment)
  File "R:\web2py\applications\myapp\models\db.py", line 321, in 
'')
  File "R:\web2py\gluon\tools.py", line 884, in __init__
self.request_vars = request and request.vars or current.request.vars
  File "R:\web2py\gluon\globals.py", line 316, in vars
self.parse_all_vars()
  File "R:\web2py\gluon\globals.py", line 287, in parse_all_vars
for key, value in iteritems(self.post_vars):
  File "R:\web2py\gluon\globals.py", line 308, in post_vars
self.parse_post_vars()
  File "R:\web2py\gluon\globals.py", line 244, in parse_post_vars
dpost = cgi.FieldStorage(fp=body, environ=env, keep_blank_values=1)
  File "c:\python37\lib\cgi.py", line 491, in __init__
self.read_single()
  File "c:\python37\lib\cgi.py", line 682, in read_single
self.read_binary()
  File "c:\python37\lib\cgi.py", line 704, in read_binary
self.file.write(data)
  File "c:\python37\lib\tempfile.py", line 481, in func_wrapper
return func(*args, **kwargs)
TypeError: write() argument must be str, not bytes


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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/29f98bbe-ef10-4fb4-8201-29114d484910%40googlegroups.com.


[web2py] xmlrpc python3 error

2019-09-26 Thread Mark
Hello,

I got an error in python3.7, web2py 2.18.3.

Testing the following client side code in python2.7:
server = ServerProxy('https://127.0.0.1/myapp/query/call/xmlrpc', 
context=ssl._create_unverified_context())
server.test_xmlrpc()

If web2py run in python2.7, everything is fine.
If web2py run in python3.7, got error:
xmlrpclib.ProtocolError: 

Thank you very much for your help.

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/488a96e6-a90b-4a9a-9191-23122986e2a7%40googlegroups.com.


[web2py] Re: web2py.test replacement

2018-10-12 Thread mark
https://bitbucket.org/MarkGraves/web2pytest

On Friday, October 12, 2018 at 9:40:12 AM UTC-5, Bryan Chance wrote:
>
> Does anyone know of a web2py.test replacement? The link I see everywhere 
> is for what looks to be a deleted repo:
> https://github.com/viniciusban/web2py.test
>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: system project manager in web2py

2018-07-29 Thread mark
Hey Rodrigo,

What are you looking for in particular?

There's a number of open and closed source implementations available.


On Sunday, July 29, 2018 at 2:52:19 PM UTC-5, Rodrigo attique santana wrote:
>
> Hi guys.
>
> I was looking for and found nothing about web2py project management systems. 
> Do you know if there is any such project?
>
>

-- 
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: LDAP Authentication never work

2018-07-04 Thread mark
A few thoughts:

Can you connect from the server where the ldap account is located?

What does that connection string look like?

Looking here:

https://github.com/web2py/web2py/blob/master/gluon/contrib/login_methods/ldap_auth.py

It boils down to the init_ldap method and ldap.initialize()

You can somehow log output there to make sure the connection string is 
appropriate

If you can connect to the ldap server, try to log the raw requests to 
console somehow as suggested below to see the query and url.

On Friday, June 8, 2018 at 1:45:10 AM UTC-5, Suhas Jadhav wrote:
>
> Hi Gurus,
>
> My below code always authenticate against db and not ldap. Can you please 
> help.
>
> @auth.requires_login()
> def test():
> from gluon.contrib.login_methods.ldap_auth import ldap_auth
> 
> auth.settings.actions_disabled=['register','change_password','request_reset_password','retrieve_username','profile']
> auth.settings.remember_me_form = False
> auth.settings.login_methods=[ldap_auth(
> mode='ad', server='ldaps://server.com',base_dn='ou=Service 
> Accounts,dc=sea,dc=corp,dc=com') ]
> 
> 
> return locals()
>

-- 
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: Classes: Iteration of Row Objects & Updating

2018-06-09 Thread Mark Billion
Anthony -- I havent met you, but I certainly owe you a beer.  Thank you for
all of your help.

On Fri, Jun 8, 2018 at 10:47 PM, Anthony  wrote:

> On Friday, June 8, 2018 at 5:49:07 PM UTC-4, Mark Billion wrote:
>>
>> Ive checked the docs and am sure I am missing it, but can someone please
>> confirm or deny: If I iterate a row class attribute via another class
>> method, updates applied by that method will will update the underlying row
>> attribute?
>>
>> For example:
>>
>> __init__:
>>  self.dbobj = db(db.foo.bar>0).select()
>>
>> def abc:
>>  for x in self.dbobj:
>>  x.attribute = "a"
>>
>> My question is whether the self.dbobj attribute characteristic is now set
>> to "a" for all records until the object is either destroyed or reupdated.
>>
>
> Yes.
>
> --
> 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/RpxqxmK4bCU/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.
>



-- 
Mark M. Billion
1904 N. Lincoln
Wilmington, DE 19806
302.416.2199

-- 
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] Classes: Iteration of Row Objects & Updating

2018-06-08 Thread Mark Billion
Ive checked the docs and am sure I am missing it, but can someone please 
confirm or deny: If I iterate a row class attribute via another class 
method, updates applied by that method will will update the underlying row 
attribute?

For example:

__init__:
 self.dbobj = db(db.foo.bar>0).select()

def abc:
 for x in self.dbobj:
 x.attribute = "a"

My question is whether the self.dbobj attribute characteristic is now set 
to "a" for all records until the object is either destroyed or reupdated.  
I know I could test it, but I was wondering if there was a definitive 
answer...

-- 
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] (commercial solicitation) web2py development projects

2018-05-29 Thread mark
Hello everyone,

First off, many thanks to all the contributors here who have made web2py 
amazing.

We (MyIRE) are currently rolling out our reproducible clinical trials 
platform which uses web2py.  

As we roll it out publicly, we're going to be looking for more talented 
individuals to work on it, stress test it, etc.

Specifically in the next few months we'll be beefing up  our open source 
initiatives.

If you have an interest in security and would like to be included in these 
releases and discussions, please reach out to me directly.

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: [OFF TOPIC] Telegram Group for Web2py users

2018-05-24 Thread mark
FYI

That group is closed for posting.

On Saturday, May 5, 2018 at 10:07:30 PM UTC-5, Massimo Di Pierro wrote:
>
> Thank you.
>
> On Wednesday, 2 May 2018 16:48:52 UTC-5, marco mansilla wrote:
>>
>> I know this is the main communication channel for web2py users community, 
>> but just in case anyone wants some interactivity I have created 
>> https://t.me/web2py
>>
>>
>> Marco.
>>
>

-- 
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] Updating the default template

2018-03-10 Thread Mark Erbaugh
When I was learning web2py, I watched Massimo's DePaul course videos. I 
could have sworn that there was a place in there where he mentioned how to 
update the welcome app and save things so that those changes are reflected 
in new apps that are created, but I can't find it again.

-- 
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] Search box in navbar in defaut layout.html

2018-03-10 Thread Mark Erbaugh
What is the purpose and usage of the Search box displayed in the navbar 
when using the default layout.html?

Here's the code in layout.html:


  
  

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] Backwards compatibility

2018-03-07 Thread Mark Erbaugh
I appreciate Web2py's view towards backwards compatibility, but I think 
some of the included libraries do not share the same philosophy. I have had 
to make changes eliminate errors or have expected functionality. I would 
like to know if I'm doing this right and if I've missed something.

If you view pages using developer tools, you see an error message that 
Bootstrap tooltips require Tether. I solved this by downloading tether.min 
ad additing it to layout.html.

In the admin mode, if you try and edit a table with a list field, the + and 
- icons are missing. The buttons are there, just blank. I solved this by 
adding glyhpicons.css to layout.html which uses Glyphicons Halflings font. 
Interestingly, the glyicons-haflings files referenced were already in the 
statc\fonts directory.

Thanks,
Mark






-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Problem Pickling Session

2018-03-07 Thread Mark Erbaugh
I'm not sure this is the right way to answer Massimo's question as there 
appears to be no way to reply to his reply.

Web2Py is 2.16.1-stable+timestamp.2017.11.14.05.54.25

I tried deleting all the files in the application (both my application and 
admin) sessions folders, but still have the same error.

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

2018-03-06 Thread Mark Erbaugh
I installed Web2py and Apache on a Raspberry Pi using the Ubuntu installation 
script. That script generated a self-signed SSL certificate.

If I access the app using HTTP on port 80 and HTTPS on port 443, all is fine.

This app is replacing a legacy app that needs to run HTTP on port 8080. I 
reconfigured Apache's ports.conf to listen on 8080 and default.conf to have a 
virtualhost on 8080.

The app works fine if I access it only via HTTP on port 8080 or HTTPS on port 
443, but if you try to access it from the other port (443 if the first access 
after an Apache restart was on 8080 or 8080 if the first access was on 443), I 
get an error ticket. Clicking on the error ticket just leads to another ticket.

I copied the error file to another Web2py server and here's the traceback:

Traceback (most recent call last):
  File "/home/www-data/web2py/gluon/main.py", line 434, in wsgibase
session.connect(request, response)
  File "/home/www-data/web2py/gluon/globals.py", line 1000, in connect
session_pickled = pickle.dumps(self, pickle.HIGHEST_PROTOCOL)
  File "/home/www-data/web2py/gluon/storage.py", line 52, in 
__getnewargs__ = lambda self: getattr(dict,self).__getnewargs__(self)
TypeError: getattr(): attribute name must be string

I think Web2py is having problems pickling the Session object.  I added a 
diagnostic printout and when the pickle is failing the Session object prints as 
Storage({}), which I assume is an empty object. However, working with the 
diagnostic printout, I also see cases where an empty object pickles just fine, 
just not ones generated when I switched ports.

-- 
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: auth.messages.subject

2018-01-25 Thread Mark Billion
This was awesome and Marcelo's answer was perfect (yours, as always
Anthony, is spot on too).

On Thu, Jan 25, 2018 at 12:53 PM, Anthony <abasta...@gmail.com> wrote:

> There is no auth.messages.subject. However, there are more specific
> auth.messages for particular types of emails sent by Auth. You can find
> them listed at http://web2py.com/books/default/chapter/29/09/access-
> control#Auth-Settings-and-messages or https://github.com/web2py/
> web2py/blob/623f3b99477eb97ffadb20d6f7cb3da398253c9c/gluon/tools.py#L1537
> (they all end in "_subject").
>
> Anthony
>
>
> On Wednesday, January 24, 2018 at 1:47:50 PM UTC-5, Mark Billion wrote:
>>
>> So, this does not work.  Any way to set the subject line? (maybe Im just
>> missing it)
>>
> --
> 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/ZYx1n9c6dNE/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.
>



-- 
Mark M. Billion
1904 N. Lincoln
Wilmington, DE 19806
302.416.2199

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

2018-01-24 Thread Mark Billion
Sorry, that covers gen emails not the auth section as far as I can see

On Wednesday, January 24, 2018 at 1:50:04 PM UTC-5, Marcelo Huerta wrote:
>
> El miércoles, 24 de enero de 2018, 15:47:50 (UTC-3), Mark Billion escribió:
>>
>> So, this does not work.  Any way to set the subject line? (maybe Im just 
>> missing it)
>>
>
> http://web2py.com/books/default/chapter/29/08/emails-and-sms#Sending-emails
>  
>

-- 
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] auth.messages.subject

2018-01-24 Thread Mark Billion
So, this does not work.  Any way to set the subject line? (maybe Im just 
missing it)

-- 
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: auth_cas redis session_filename + logout issue

2017-08-24 Thread Mark Graves
Got it!

migrate = False, migrate_enabled = False to fix the FK error.

Still no clue on why its declaring a session file_name.

Oddly enough, its a string in this case, but in file based sessions its an
open file object.

It still seems to be only in memory CAS clients that have the issue.

On Fri, Aug 18, 2017 at 12:35 PM, Mark Graves <mgrave...@gmail.com> wrote:

> On deeper inspection, the logout issue is strange, and related to the
> redis sessions.
>
> auth.settings.login_form.cas_logout_url
>
>
> is the right URL.  If I visit it independently in a browser it works as
> expected.
>
> However, there are no auth_users created in the cas_consumer app when
> redis sessions are used.  They are created when redis sessions are not used.
>
> Is that expected behavior?  It strikes me as a misconfiguration issue.
>
> On Friday, August 18, 2017 at 12:22:40 AM UTC-5, Mark Graves wrote:
>>
>> Hey everyone,
>>
>> Question / potential bug(s):
>>
>> I created the following to reproduce:
>>
>> https://bitbucket.org/MarkGraves/web2py_cas
>>
>> Basically, when I run that setup.sh, it sets up two apps and installs
>> redis in virtual environments, copies in web2py, and replaces db.py with
>> the one in the main repo.
>>
>> Its the only file that has changed from a default web2py setup.
>>
>> The odd thing is that when I run these apps, the consumer app sets
>> response.session_file to None, and has a response.session_filename
>>
>> The file does not exist after a single request.  It may at some point
>> during the request (easy enough to check).
>>
>> It does not appear to have the same effect on the cas_provider app, at
>> least via the output (neither is a key in response object)
>>
>> I think this is around 883 but not sure, in https://github.com/web2py/w
>> eb2py/blob/master/gluon/globals.py
>>
>> There are distinctly two times that response.session_filename gets called
>> in that file only for the consumer app. I figured that out by logging to
>> console around every call.
>>
>> I don't know if thats intentional, or a bug.
>>
>> The second part however, may be related to setup.
>>
>> I can logout from the session via the provider app, but attempting to
>> logout via the consumer app gives me a foreign key error. didnt have time
>> to jump into the generation of logout url.
>>
>> Thoughts?
>>
> --
> 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/u5r2lvAxAD4/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: auth_cas redis session_filename + logout issue

2017-08-18 Thread Mark Graves
On deeper inspection, the logout issue is strange, and related to the redis 
sessions.

auth.settings.login_form.cas_logout_url


is the right URL.  If I visit it independently in a browser it works as 
expected. 

However, there are no auth_users created in the cas_consumer app when redis 
sessions are used.  They are created when redis sessions are not used.

Is that expected behavior?  It strikes me as a misconfiguration issue.

On Friday, August 18, 2017 at 12:22:40 AM UTC-5, Mark Graves wrote:
>
> Hey everyone,  
>
> Question / potential bug(s):
>
> I created the following to reproduce:
>
> https://bitbucket.org/MarkGraves/web2py_cas
>
> Basically, when I run that setup.sh, it sets up two apps and installs 
> redis in virtual environments, copies in web2py, and replaces db.py with 
> the one in the main repo.
>
> Its the only file that has changed from a default web2py setup.
>
> The odd thing is that when I run these apps, the consumer app sets 
> response.session_file to None, and has a response.session_filename
>
> The file does not exist after a single request.  It may at some point 
> during the request (easy enough to check).
>
> It does not appear to have the same effect on the cas_provider app, at 
> least via the output (neither is a key in response object)
>
> I think this is around 883 but not sure, in 
> https://github.com/web2py/web2py/blob/master/gluon/globals.py
>
> There are distinctly two times that response.session_filename gets called 
> in that file only for the consumer app. I figured that out by logging to 
> console around every call.
>
> I don't know if thats intentional, or a bug.
>
> The second part however, may be related to setup.
>
> I can logout from the session via the provider app, but attempting to 
> logout via the consumer app gives me a foreign key error. didnt have time 
> to jump into the generation of logout url.
>
> Thoughts?
>

-- 
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] auth_cas redis session_filename + logout issue

2017-08-17 Thread Mark Graves
Hey everyone,  

Question / potential bug(s):

I created the following to reproduce:

https://bitbucket.org/MarkGraves/web2py_cas

Basically, when I run that setup.sh, it sets up two apps and installs redis 
in virtual environments, copies in web2py, and replaces db.py with the one 
in the main repo.

Its the only file that has changed from a default web2py setup.

The odd thing is that when I run these apps, the consumer app sets 
response.session_file to None, and has a response.session_filename

The file does not exist after a single request.  It may at some point 
during the request (easy enough to check).

It does not appear to have the same effect on the cas_provider app, at 
least via the output (neither is a key in response object)

I think this is around 883 but not sure, in 
https://github.com/web2py/web2py/blob/master/gluon/globals.py

There are distinctly two times that response.session_filename gets called 
in that file only for the consumer app. I figured that out by logging to 
console around every call.

I don't know if thats intentional, or a bug.

The second part however, may be related to setup.

I can logout from the session via the provider app, but attempting to 
logout via the consumer app gives me a foreign key error. didnt have time 
to jump into the generation of logout url.

Thoughts?

-- 
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] Styling the Sign Up Page

2017-08-14 Thread Mark Billion
I have Jquery that works fine to style the user/login page

$( document ).ready(function() {
$(":submit").addClass( "btn btn-default" );

$(".btn").css('margin-right', '10px');
$(".w2p_fl").attr('align', 'right');
$( "form>table" ).prepend( '' )
});


But I cant for the life of me get it to apply when I hit the sign up 
button.  This is what Im using, but Ive also tried form and even document 
dot change

$(".form-sign").change(function(){
$(":submit").addClass( "btn btn-default" );

$(".btn").css('margin-right', '10px');
$(".w2p_fl").attr('align', 'right');
//$( "form>table" ).prepend( 'table" ).prepend( '' )

Any thoughts?

-- 
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] redirect if registration is pending

2017-07-25 Thread Mark Billion
Dumb question and Im sure that there is an answer that Im missing, but when 
in doubt

App requires registration to be approved and if its not, it redirects to 
the home screen and flashes the standard message.  If I want to redirect a 
login where the user is pending approval to a different page, what is the 
code for that?

ie, something like: auth.settings.register_pending__next = 'foo'

Any thoughts?

-- 
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: web2pyslices

2017-03-31 Thread Mark Graves
I'd be happy to convert it to something.  I can write a quick scraper which 
would maintain whatever info is publicly available and upload it as static 
files to github or something.



On Tuesday, March 21, 2017 at 2:53:16 PM UTC-5, Massimo Di Pierro wrote:
>
> web2pyslices is becoming hard to maintain. Right now the best solution is 
> to create a github repo and move all the recipes into issues. We will 
> deprecate by closing them. People with gihub accounts can post and comment 
> issues/recipes. Unless you have a better solution, this will be done within 
> the next week.
>
> One sideffect is that we will lose some information about authorship of 
> the recipes and the comments. We will add a notice "created by {...}" but 
> the {...} name will be the web2pyslices username and that may not mean 
> anything in the gihub context.
>
> At this I do not have a better solution but please share your thoughts. 
>
>

-- 
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 architect a public facing data subset

2017-01-26 Thread Mark Graves
+1 for Leonel

On Wednesday, January 25, 2017 at 7:51:49 PM UTC-6, Dave S wrote:
>
>
>
> On Wednesday, January 25, 2017 at 4:31:20 PM UTC-8, Leonel Câmara wrote:
>>
>> web2py permissions not enough?
>>
>> If not, I guess you could make 2 applications which had 2 different 
>> users/roles in the same database, the user on the public facing application 
>> would have all privileges  revoked and then you would give it only exactly 
>> what you want to be public.
>>
>> See:
>>
>> https://support.chartio.com/knowledgebase/limit-postgresql-user-access-using-schema
>>
>> Make sure that the public application has migrate=False as that would 
>> probably go very wrong and be careful to define your models according to 
>> the views.
>>
>> Do understand that your requirement to have the public facing data be 
>> realtime makes it almost impossible for the public facing application to 
>> not influence the private one's performance. It would be much better if you 
>> could make it "near" realtime.
>>
>
>
> Exporting the public data to a second DB seems like a reasonable way to 
> deal with this, but is likely to be "near realtime" rather than "realtime". 
>  I've read about such things before, but haven't tried it anywhere.
>
> /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: homebrew python not working with web2py

2017-01-03 Thread Mark Graves
Those are the best kinds of bugs =)

Happy New Year

On Tuesday, January 3, 2017 at 9:11:31 AM UTC-6, lyn2py wrote:
>
> It is working now. O.O Sorry for the noise and thank you for your time 
> Mark.
>
> I blew a fuse in the house and then it worked. Prior to that I restarted 
> the computer and it still didn't work. This is crazy and not 
> reproducible... YMMV...
>
>
>
> On Tuesday, January 3, 2017 at 10:54:35 PM UTC+8, lyn2py wrote:
>>
>> No, did not try the zip. It doesn't have to do with the release, rather 
>> it is the version of python that was installed by homebrew. I read 
>> somewhere that it is unstable, I don't know why that would be the case. 
>> While we are on the topic, did you try the python installation by homebrew? 
>> Is web2py running with the python 2 installed by homebrew for you?
>>
>> which python was included in my first post, here it is again:
>>
>> $ which python
>>
>> /usr/local/bin/python
>>
>>
>>
>>
>> HOMEBREW
>>
>> $ python
>>
>> Python 2.7.13 (default, Dec 17 2016, 23:03:43) 
>>
>> [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin
>>
>> Type "help", "copyright", "credits" or "license" for more information.
>>
>> >>> import os
>>
>> >>> print os.environ['PYTHONPATH']
>>
>> Traceback (most recent call last):
>>
>>   File "", line 1, in 
>>
>>   File 
>> "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/UserDict.py"
>> , line 40, in __getitem__
>>
>> raise KeyError(key)
>>
>> KeyError: 'PYTHONPATH'
>>
>> >>> import sys
>>
>> >>> print sys.path
>>
>> ['', 
>> '/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python27.zip'
>> , 
>> '/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7'
>> , 
>> '/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin'
>> , 
>> '/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac'
>> , 
>> '/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages'
>> , 
>> '/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk'
>> , 
>> '/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old'
>> , 
>> '/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload'
>> , '/usr/local/lib/python2.7/site-packages']
>>
>>
>> SYSTEM
>>
>> $ /usr/bin/python
>>
>> Python 2.7.10 (default, Oct 23 2015, 19:19:21) 
>>
>> [GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.5)] on darwin
>>
>> Type "help", "copyright", "credits" or "license" for more information.
>>
>> >>> import os
>>
>> >>> print os.environ['PYTHONPATH']
>>
>> Traceback (most recent call last):
>>
>>   File "", line 1, in 
>>
>>   File 
>> "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/UserDict.py"
>> , line 23, in __getitem__
>>
>> raise KeyError(key)
>>
>> KeyError: 'PYTHONPATH'
>>
>> >>> import sys
>>
>> >>> print sys.path
>>
>> ['', 
>> '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip'
>> , 
>> '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7', 
>> '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin'
>> , 
>> '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac'
>> , 
>> '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages'
>> , 
>> '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python'
>> , 
>> '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk'
>> , 
>> '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old'
>> , 
>> '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload'
>> , 
>> '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC'
>> , '/Library/Python/2.7/site-packages']
>>
>>
>>
>>

Re: [web2py] Re: homebrew python not working with web2py

2017-01-03 Thread Mark Graves
Also, under each please list the output of:

import os
print os.environ['PYTHONPATH']

import sys
print sys.path

On Tue, Jan 3, 2017 at 3:58 AM, Mark Graves <mgrave...@gmail.com> wrote:

> Wait wait, whats the output of
>
> which python
>
> On Tue, Jan 3, 2017 at 3:43 AM, Mark Graves <mgrave...@gmail.com> wrote:
>
>> did you try the downloaded via zip version?
>>
>> On Mon, Jan 2, 2017 at 9:01 AM, lyn2py <lyn...@gmail.com> wrote:
>>
>>> Nope :)
>>>
>>> On Monday, January 2, 2017 at 10:55:59 AM UTC+8, Mark Graves wrote:
>>>>
>>>> Is it in a virtual environment?
>>>>
>>>> -Mark
>>>>
>>>> On Sun, Jan 1, 2017 at 8:37 PM, lyn2py <lyn...@gmail.com> wrote:
>>>>
>>>>> First, it is a working folder that I've been using. It breaks the
>>>>> moment when I use homebrew's version of python to start web2py. It works
>>>>> when I use the system's python. Both commands are on the same directory.
>>>>> Secondly, I have tried git clone recursive in a brand new folder, but
>>>>> it's still the same result.
>>>>>
>>>>> On Monday, January 2, 2017 at 9:51:55 AM UTC+8, Mark Graves wrote:
>>>>>>
>>>>>> potential quick fix before giving it thought:
>>>>>>
>>>>>> did you:
>>>>>>
>>>>>>  git submodule update --init --recursive
>>>>>> You can easily try this by creating a new web2py installation in a
>>>>>> different folder so you don't mess up exising apps.
>>>>>>
>>>>>> Also, is it broken with the downloaded version via zip?
>>>>>>
>>>>>> On Sun, Jan 1, 2017 at 9:02 AM, lyn2py <lyn...@gmail.com> wrote:
>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Saturday, December 31, 2016 at 5:06:07 AM UTC+8, Mark Graves
>>>>>>> wrote:
>>>>>>>>
>>>>>>>> How did you install web2py?  as a zip? via git?
>>>>>>>>
>>>>>>>
>>>>>>> *git clone*
>>>>>>>
>>>>>>>
>>>>>>>> Did you ever pip install gluon?
>>>>>>>>
>>>>>>>
>>>>>>> *nope*
>>>>>>>
>>>>>>>
>>>>>>>> Did you install web2py / python at different times?
>>>>>>>>
>>>>>>>
>>>>>>> *I've been using web2py for years using the system python, and I
>>>>>>> only installed python via homebrew recently for other purposes, and
>>>>>>> homebrew automatically replaced the system python as the default one to 
>>>>>>> use
>>>>>>> (no complaints, since it's a higher version), which was why I discovered
>>>>>>> that it won't work with web2py. The only thing, I presume, is 
>>>>>>> different, is
>>>>>>> the version of python. If you see the code in my first post, the 
>>>>>>> respective
>>>>>>> versions for SYSTEM vs HOMEBREW are 2.7.10 and 2.7.13.*
>>>>>>>
>>>>>>>
>>>>>>>>
>>>>>>>> Can you try under each python version to do:
>>>>>>>>
>>>>>>>> import gluon.widget
>>>>>>>>
>>>>>>>
>>>>>>> *Oh good suggestion. I tried with both, and they both imported it
>>>>>>> fine. So it works in command-line python, but not with web2py (I dunno 
>>>>>>> the
>>>>>>> right word for this... app / desktop app / guy)? I'll be happy to run 
>>>>>>> any
>>>>>>> tests to figure out why... but do you think there might be something 
>>>>>>> wrong
>>>>>>> with the version installed by homebrew??*
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>>
>>>>>>>> On Thursday, December 29, 2016 at 11:29:08 PM UTC-6, lyn2py wrote:
>>>>>>>>>
>>>>>>>>> I am not sure if this is the right place to ask this, but it only
>>>>>>>>> happens with web2py (for now).
>>>>>>>&

Re: [web2py] Re: homebrew python not working with web2py

2017-01-03 Thread Mark Graves
Wait wait, whats the output of

which python

On Tue, Jan 3, 2017 at 3:43 AM, Mark Graves <mgrave...@gmail.com> wrote:

> did you try the downloaded via zip version?
>
> On Mon, Jan 2, 2017 at 9:01 AM, lyn2py <lyn...@gmail.com> wrote:
>
>> Nope :)
>>
>> On Monday, January 2, 2017 at 10:55:59 AM UTC+8, Mark Graves wrote:
>>>
>>> Is it in a virtual environment?
>>>
>>> -Mark
>>>
>>> On Sun, Jan 1, 2017 at 8:37 PM, lyn2py <lyn...@gmail.com> wrote:
>>>
>>>> First, it is a working folder that I've been using. It breaks the
>>>> moment when I use homebrew's version of python to start web2py. It works
>>>> when I use the system's python. Both commands are on the same directory.
>>>> Secondly, I have tried git clone recursive in a brand new folder, but
>>>> it's still the same result.
>>>>
>>>> On Monday, January 2, 2017 at 9:51:55 AM UTC+8, Mark Graves wrote:
>>>>>
>>>>> potential quick fix before giving it thought:
>>>>>
>>>>> did you:
>>>>>
>>>>>  git submodule update --init --recursive
>>>>> You can easily try this by creating a new web2py installation in a
>>>>> different folder so you don't mess up exising apps.
>>>>>
>>>>> Also, is it broken with the downloaded version via zip?
>>>>>
>>>>> On Sun, Jan 1, 2017 at 9:02 AM, lyn2py <lyn...@gmail.com> wrote:
>>>>>
>>>>>>
>>>>>>
>>>>>> On Saturday, December 31, 2016 at 5:06:07 AM UTC+8, Mark Graves wrote:
>>>>>>>
>>>>>>> How did you install web2py?  as a zip? via git?
>>>>>>>
>>>>>>
>>>>>> *git clone*
>>>>>>
>>>>>>
>>>>>>> Did you ever pip install gluon?
>>>>>>>
>>>>>>
>>>>>> *nope*
>>>>>>
>>>>>>
>>>>>>> Did you install web2py / python at different times?
>>>>>>>
>>>>>>
>>>>>> *I've been using web2py for years using the system python, and I only
>>>>>> installed python via homebrew recently for other purposes, and homebrew
>>>>>> automatically replaced the system python as the default one to use (no
>>>>>> complaints, since it's a higher version), which was why I discovered that
>>>>>> it won't work with web2py. The only thing, I presume, is different, is 
>>>>>> the
>>>>>> version of python. If you see the code in my first post, the respective
>>>>>> versions for SYSTEM vs HOMEBREW are 2.7.10 and 2.7.13.*
>>>>>>
>>>>>>
>>>>>>>
>>>>>>> Can you try under each python version to do:
>>>>>>>
>>>>>>> import gluon.widget
>>>>>>>
>>>>>>
>>>>>> *Oh good suggestion. I tried with both, and they both imported it
>>>>>> fine. So it works in command-line python, but not with web2py (I dunno 
>>>>>> the
>>>>>> right word for this... app / desktop app / guy)? I'll be happy to run any
>>>>>> tests to figure out why... but do you think there might be something 
>>>>>> wrong
>>>>>> with the version installed by homebrew??*
>>>>>>
>>>>>>
>>>>>>
>>>>>>>
>>>>>>> On Thursday, December 29, 2016 at 11:29:08 PM UTC-6, lyn2py wrote:
>>>>>>>>
>>>>>>>> I am not sure if this is the right place to ask this, but it only
>>>>>>>> happens with web2py (for now).
>>>>>>>>
>>>>>>>> Due to a need to use pip, I used homebrew to install python.
>>>>>>>> Sidenote: Homebrew used to require additional configuration to work
>>>>>>>> as "the python" on the system, but now it does everything 
>>>>>>>> automatically. So
>>>>>>>> when I type
>>>>>>>>
>>>>>>>> $ which python
>>>>>>>>
>>>>>>>> ...I get the one that homebrew installed.
>>>>>>>>
>>>>>>>> Onward...
>>>>>

Re: [web2py] Re: homebrew python not working with web2py

2017-01-03 Thread Mark Graves
did you try the downloaded via zip version?

On Mon, Jan 2, 2017 at 9:01 AM, lyn2py <lyn...@gmail.com> wrote:

> Nope :)
>
> On Monday, January 2, 2017 at 10:55:59 AM UTC+8, Mark Graves wrote:
>>
>> Is it in a virtual environment?
>>
>> -Mark
>>
>> On Sun, Jan 1, 2017 at 8:37 PM, lyn2py <lyn...@gmail.com> wrote:
>>
>>> First, it is a working folder that I've been using. It breaks the moment
>>> when I use homebrew's version of python to start web2py. It works when I
>>> use the system's python. Both commands are on the same directory.
>>> Secondly, I have tried git clone recursive in a brand new folder, but
>>> it's still the same result.
>>>
>>> On Monday, January 2, 2017 at 9:51:55 AM UTC+8, Mark Graves wrote:
>>>>
>>>> potential quick fix before giving it thought:
>>>>
>>>> did you:
>>>>
>>>>  git submodule update --init --recursive
>>>> You can easily try this by creating a new web2py installation in a
>>>> different folder so you don't mess up exising apps.
>>>>
>>>> Also, is it broken with the downloaded version via zip?
>>>>
>>>> On Sun, Jan 1, 2017 at 9:02 AM, lyn2py <lyn...@gmail.com> wrote:
>>>>
>>>>>
>>>>>
>>>>> On Saturday, December 31, 2016 at 5:06:07 AM UTC+8, Mark Graves wrote:
>>>>>>
>>>>>> How did you install web2py?  as a zip? via git?
>>>>>>
>>>>>
>>>>> *git clone*
>>>>>
>>>>>
>>>>>> Did you ever pip install gluon?
>>>>>>
>>>>>
>>>>> *nope*
>>>>>
>>>>>
>>>>>> Did you install web2py / python at different times?
>>>>>>
>>>>>
>>>>> *I've been using web2py for years using the system python, and I only
>>>>> installed python via homebrew recently for other purposes, and homebrew
>>>>> automatically replaced the system python as the default one to use (no
>>>>> complaints, since it's a higher version), which was why I discovered that
>>>>> it won't work with web2py. The only thing, I presume, is different, is the
>>>>> version of python. If you see the code in my first post, the respective
>>>>> versions for SYSTEM vs HOMEBREW are 2.7.10 and 2.7.13.*
>>>>>
>>>>>
>>>>>>
>>>>>> Can you try under each python version to do:
>>>>>>
>>>>>> import gluon.widget
>>>>>>
>>>>>
>>>>> *Oh good suggestion. I tried with both, and they both imported it
>>>>> fine. So it works in command-line python, but not with web2py (I dunno the
>>>>> right word for this... app / desktop app / guy)? I'll be happy to run any
>>>>> tests to figure out why... but do you think there might be something wrong
>>>>> with the version installed by homebrew??*
>>>>>
>>>>>
>>>>>
>>>>>>
>>>>>> On Thursday, December 29, 2016 at 11:29:08 PM UTC-6, lyn2py wrote:
>>>>>>>
>>>>>>> I am not sure if this is the right place to ask this, but it only
>>>>>>> happens with web2py (for now).
>>>>>>>
>>>>>>> Due to a need to use pip, I used homebrew to install python.
>>>>>>> Sidenote: Homebrew used to require additional configuration to work
>>>>>>> as "the python" on the system, but now it does everything 
>>>>>>> automatically. So
>>>>>>> when I type
>>>>>>>
>>>>>>> $ which python
>>>>>>>
>>>>>>> ...I get the one that homebrew installed.
>>>>>>>
>>>>>>> Onward...
>>>>>>> I tried
>>>>>>>
>>>>>>> $ python web2py.py
>>>>>>>
>>>>>>> ...which is the homebrew installed one, and ran into this error:
>>>>>>>
>>>>>>> Traceback (most recent call last):
>>>>>>>
>>>>>>>   File "/Users/web2py/web2py.py", line 21, in 
>>>>>>>
>>>>>>> import gluon.widget
>>>>>>>
>>>>>>>   File "/

Re: [web2py] Re: homebrew python not working with web2py

2017-01-01 Thread Mark Graves
Is it in a virtual environment?

-Mark

On Sun, Jan 1, 2017 at 8:37 PM, lyn2py <lyn...@gmail.com> wrote:

> First, it is a working folder that I've been using. It breaks the moment
> when I use homebrew's version of python to start web2py. It works when I
> use the system's python. Both commands are on the same directory.
> Secondly, I have tried git clone recursive in a brand new folder, but it's
> still the same result.
>
> On Monday, January 2, 2017 at 9:51:55 AM UTC+8, Mark Graves wrote:
>>
>> potential quick fix before giving it thought:
>>
>> did you:
>>
>>  git submodule update --init --recursive
>> You can easily try this by creating a new web2py installation in a
>> different folder so you don't mess up exising apps.
>>
>> Also, is it broken with the downloaded version via zip?
>>
>> On Sun, Jan 1, 2017 at 9:02 AM, lyn2py <lyn...@gmail.com> wrote:
>>
>>>
>>>
>>> On Saturday, December 31, 2016 at 5:06:07 AM UTC+8, Mark Graves wrote:
>>>>
>>>> How did you install web2py?  as a zip? via git?
>>>>
>>>
>>> *git clone*
>>>
>>>
>>>> Did you ever pip install gluon?
>>>>
>>>
>>> *nope*
>>>
>>>
>>>> Did you install web2py / python at different times?
>>>>
>>>
>>> *I've been using web2py for years using the system python, and I only
>>> installed python via homebrew recently for other purposes, and homebrew
>>> automatically replaced the system python as the default one to use (no
>>> complaints, since it's a higher version), which was why I discovered that
>>> it won't work with web2py. The only thing, I presume, is different, is the
>>> version of python. If you see the code in my first post, the respective
>>> versions for SYSTEM vs HOMEBREW are 2.7.10 and 2.7.13.*
>>>
>>>
>>>>
>>>> Can you try under each python version to do:
>>>>
>>>> import gluon.widget
>>>>
>>>
>>> *Oh good suggestion. I tried with both, and they both imported it fine.
>>> So it works in command-line python, but not with web2py (I dunno the right
>>> word for this... app / desktop app / guy)? I'll be happy to run any tests
>>> to figure out why... but do you think there might be something wrong with
>>> the version installed by homebrew??*
>>>
>>>
>>>
>>>>
>>>> On Thursday, December 29, 2016 at 11:29:08 PM UTC-6, lyn2py wrote:
>>>>>
>>>>> I am not sure if this is the right place to ask this, but it only
>>>>> happens with web2py (for now).
>>>>>
>>>>> Due to a need to use pip, I used homebrew to install python.
>>>>> Sidenote: Homebrew used to require additional configuration to work as
>>>>> "the python" on the system, but now it does everything automatically. So
>>>>> when I type
>>>>>
>>>>> $ which python
>>>>>
>>>>> ...I get the one that homebrew installed.
>>>>>
>>>>> Onward...
>>>>> I tried
>>>>>
>>>>> $ python web2py.py
>>>>>
>>>>> ...which is the homebrew installed one, and ran into this error:
>>>>>
>>>>> Traceback (most recent call last):
>>>>>
>>>>>   File "/Users/web2py/web2py.py", line 21, in 
>>>>>
>>>>> import gluon.widget
>>>>>
>>>>>   File "/Users/web2py/gluon/__init__.py", line 31, in 
>>>>>
>>>>> "You can also download a complete copy from http://www.web2py.com
>>>>> ."
>>>>>
>>>>> RuntimeError: web2py depends on pydal, which apparently you have not
>>>>> installed.
>>>>>
>>>>> Probably you cloned the repository using git without '--recursive'
>>>>>
>>>>> To fix this, please run (from inside your web2py folder):
>>>>>
>>>>>
>>>>>
>>>>>  git submodule update --init --recursive
>>>>>
>>>>>
>>>>>
>>>>> You can also download a complete copy from http://www.web2py.com.
>>>>>
>>>>>
>>>>> But when I run this command, which uses the system's python, it works!
>>>>>
>>>>> $ /usr/bin/python w

Re: [web2py] Re: homebrew python not working with web2py

2017-01-01 Thread Mark Graves
potential quick fix before giving it thought:

did you:

 git submodule update --init --recursive
You can easily try this by creating a new web2py installation in a
different folder so you don't mess up exising apps.

Also, is it broken with the downloaded version via zip?

On Sun, Jan 1, 2017 at 9:02 AM, lyn2py <lyn...@gmail.com> wrote:

>
>
> On Saturday, December 31, 2016 at 5:06:07 AM UTC+8, Mark Graves wrote:
>>
>> How did you install web2py?  as a zip? via git?
>>
>
> *git clone*
>
>
>> Did you ever pip install gluon?
>>
>
> *nope*
>
>
>> Did you install web2py / python at different times?
>>
>
> *I've been using web2py for years using the system python, and I only
> installed python via homebrew recently for other purposes, and homebrew
> automatically replaced the system python as the default one to use (no
> complaints, since it's a higher version), which was why I discovered that
> it won't work with web2py. The only thing, I presume, is different, is the
> version of python. If you see the code in my first post, the respective
> versions for SYSTEM vs HOMEBREW are 2.7.10 and 2.7.13.*
>
>
>>
>> Can you try under each python version to do:
>>
>> import gluon.widget
>>
>
> *Oh good suggestion. I tried with both, and they both imported it fine. So
> it works in command-line python, but not with web2py (I dunno the right
> word for this... app / desktop app / guy)? I'll be happy to run any tests
> to figure out why... but do you think there might be something wrong with
> the version installed by homebrew??*
>
>
>
>>
>> On Thursday, December 29, 2016 at 11:29:08 PM UTC-6, lyn2py wrote:
>>>
>>> I am not sure if this is the right place to ask this, but it only
>>> happens with web2py (for now).
>>>
>>> Due to a need to use pip, I used homebrew to install python.
>>> Sidenote: Homebrew used to require additional configuration to work as
>>> "the python" on the system, but now it does everything automatically. So
>>> when I type
>>>
>>> $ which python
>>>
>>> ...I get the one that homebrew installed.
>>>
>>> Onward...
>>> I tried
>>>
>>> $ python web2py.py
>>>
>>> ...which is the homebrew installed one, and ran into this error:
>>>
>>> Traceback (most recent call last):
>>>
>>>   File "/Users/web2py/web2py.py", line 21, in 
>>>
>>> import gluon.widget
>>>
>>>   File "/Users/web2py/gluon/__init__.py", line 31, in 
>>>
>>> "You can also download a complete copy from http://www.web2py.com.;
>>>
>>> RuntimeError: web2py depends on pydal, which apparently you have not
>>> installed.
>>>
>>> Probably you cloned the repository using git without '--recursive'
>>>
>>> To fix this, please run (from inside your web2py folder):
>>>
>>>
>>>
>>>  git submodule update --init --recursive
>>>
>>>
>>>
>>> You can also download a complete copy from http://www.web2py.com.
>>>
>>>
>>> But when I run this command, which uses the system's python, it works!
>>>
>>> $ /usr/bin/python web2py.py
>>>
>>> I could always add "/usr/bin/" as a habit when starting web2py, but why
>>> doesn't homebrew's installed python work? Are they not the same?
>>>
>>> When I run python in command line, HOMEBREW:
>>>
>>> $ python
>>>
>>> Python 2.7.13 (default, Dec 17 2016, 23:03:43)
>>>
>>> [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin
>>>
>>> Type "help", "copyright", "credits" or "license" for more information.
>>>
>>> >>> exit()
>>>
>>> ...and, SYSTEM:
>>>
>>> $ /usr/bin/python
>>>
>>> Python 2.7.10 (default, Oct 23 2015, 19:19:21)
>>>
>>> [GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.5)] on darwin
>>>
>>> Type "help", "copyright", "credits" or "license" for more information.
>>>
>>> >>> exit()
>>>
>>> Thank you for reading!
>>>
>> --
> 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/XN8DgrUdn0A/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: Updating log on mobile device

2016-12-30 Thread Mark Graves
Or you could always use a websocket but that might be overkill

On Thursday, December 29, 2016 at 1:48:06 PM UTC-6, Dave S wrote:
>
>
>
> On Thursday, December 29, 2016 at 6:25:09 AM UTC-8, Leonel Câmara wrote:
>>
>> I'm guessing the log entries have a created_on Field, you can 
>> periodically query the server and see if any new entries are there in which 
>> case you add them to the ones being displayed,
>>
>
> This would likely be an ajax command (like using Google Images for 
> something like "Porsche 911").  The LOAD() helper might work, but you need 
> to do a little javascript to set a timer or detect reaching the end of the 
> page.
>  
>
>> if you don't want to periodically query the server then you need to use 
>> something like websockets to allow the server to push the new log entries.
>>
>
> If it's just a single entry that's a single large file that you want to 
> "page" through, the ajax is probably the way to go. 
>
> /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: auth groups and permission

2016-12-30 Thread Mark Graves
Depends on workflow, but Stefan was similar to what I was thinking.

probably:

auth.settings.create_user_groups = None


Then after form submission, depending on workflow, algorithmically add the 
person to the group...eg.

if form.vars.is_editor == True:
db.auth_membership.insert(YOUR_DATA_HERE)

or whatever you need to actually add the person.


On Friday, December 30, 2016 at 7:29:24 AM UTC-6, Biplov Bhandari wrote:
>
> Hi Stefan,
>
> The default web2py auth_group adds a person to his own group when the user 
> is created. I want to override the default behavior. I have fixed number of 
> auth_group, say authenticated, editor, publisher and admin. I want to 
> assign a role, based on the form data. if not defaults to authenticated.
>
> On Friday, December 30, 2016 at 7:49:00 PM UTC+7, 黄祥 wrote:
>>
>> pardon, not sure what u want to achieve, did auth everybody_group_id is 
>> what u want?
>> e.g.
>> # add group id 1 do it in console or controller
>> auth.add_group('Admin', 'Admin')
>>
>> *models/db.py*
>> auth.settings.everybody_group_id = 1
>>
>> best regards,
>> stifan
>>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: homebrew python not working with web2py

2016-12-30 Thread Mark Graves
How did you install web2py?  as a zip? via git? 

Did you ever pip install gluon? 

Did you install web2py / python at different times?

Can you try under each python version to do:

import gluon.widget

On Thursday, December 29, 2016 at 11:29:08 PM UTC-6, lyn2py wrote:
>
> I am not sure if this is the right place to ask this, but it only happens 
> with web2py (for now).
>
> Due to a need to use pip, I used homebrew to install python. 
> Sidenote: Homebrew used to require additional configuration to work as 
> "the python" on the system, but now it does everything automatically. So 
> when I type
>
> $ which python
>
> ...I get the one that homebrew installed.
>
> Onward...
> I tried 
>
> $ python web2py.py
>
> ...which is the homebrew installed one, and ran into this error:
>
> Traceback (most recent call last):
>
>   File "/Users/web2py/web2py.py", line 21, in 
>
> import gluon.widget
>
>   File "/Users/web2py/gluon/__init__.py", line 31, in 
>
> "You can also download a complete copy from http://www.web2py.com.;
>
> RuntimeError: web2py depends on pydal, which apparently you have not 
> installed.
>
> Probably you cloned the repository using git without '--recursive'
>
> To fix this, please run (from inside your web2py folder):
>
>
>
>  git submodule update --init --recursive
>
>
>
> You can also download a complete copy from http://www.web2py.com.
>
>
> But when I run this command, which uses the system's python, it works!
>
> $ /usr/bin/python web2py.py
>
> I could always add "/usr/bin/" as a habit when starting web2py, but why 
> doesn't homebrew's installed python work? Are they not the same?
>
> When I run python in command line, HOMEBREW:
>
> $ python
>
> Python 2.7.13 (default, Dec 17 2016, 23:03:43) 
>
> [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin
>
> Type "help", "copyright", "credits" or "license" for more information.
>
> >>> exit()
>
> ...and, SYSTEM:
>
> $ /usr/bin/python
>
> Python 2.7.10 (default, Oct 23 2015, 19:19:21) 
>
> [GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.5)] on darwin
>
> Type "help", "copyright", "credits" or "license" for more information.
>
> >>> exit()
>
> Thank you for reading!
>

-- 
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: Deploy with postgresql

2016-12-27 Thread Mark Graves
Hopefully this is solved, but a simple test is to use the original 
appconfig.ini with storage.sqlite as the connection string.

That will tell you if it is a syntax problem, at least.

-Mark



On Monday, December 26, 2016 at 7:08:23 PM UTC-6, Ben Lawrence wrote:
>
> seems to be an appconfig problem. if I don't use appconfig.ini and place 
> the info in db.py, everything works.
>
> On Friday, December 23, 2016 at 6:16:12 AM UTC-8, Ben Lawrence wrote:
>>
>> Andre, did you solve this? For me pg 9.5 on remote ubuntu 16, web2py is 
>> not creating the tables.
>>
>> On Sunday, September 4, 2016 at 6:55:54 AM UTC-7, Morganti wrote:
>>>
>>> Hi people!
>>>
>>> I just almost in go-live. So, I tried to create a Postgresql database 
>>> and starting to configure some config tables for my appliacation, but I had 
>>> the error below.
>>>
>>> Traceback (most recent call last):
>>>   File 
>>> "/home/andre/Dropbox/Projetos/web2py/applications/87k/controllers/appadmin.py",
>>>  line 249, in select
>>> nrows = db(query, ignore_common_filters=True).count()
>>>   File 
>>> "/home/andre/Dropbox/Projetos/web2py/gluon/packages/dal/pydal/objects.py", 
>>> line 2010, in count
>>> return db._adapter.count(self.query, distinct)
>>>   File 
>>> "/home/andre/Dropbox/Projetos/web2py/gluon/packages/dal/pydal/adapters/base.py",
>>>  line 1322, in count
>>> return self.cursor.fetchone()[0]
>>> IndexError: list index out of range
>>>
>>> Thanks
>>> Best regards
>>> André
>>>
>>>
>>>

-- 
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] Jquery Decision Tree

2016-12-08 Thread Mark Billion
Im really looking just for some suggestions of particularly light weight 
ones

-- 
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: 50x performance improvement for web2py in TechEmpower Web Framework Benchmarks

2016-11-22 Thread Mark Graves
That is truly strange.  Seems to be a distinct confound.

Greatly appreciated work.



On Tue, Nov 22, 2016 at 7:27 AM, Anthony <abasta...@gmail.com> wrote:

> On Tuesday, November 22, 2016 at 8:16:16 AM UTC-5, Mark Graves wrote:
>>
>> If I'm reading that correctly, doesn't that show web2py standard and
>> optimized  top 3?
>>
>> Wouldn't that suggest a massive performance difference cloud vs baremetal?
>>
>
> On all the tasks, all the frameworks do better on bare metal than on Azure
> -- the only exception is web2py on the 20-update requests of the "Data
> updates" task, and that appears to be due to some kind of errors being
> generated, not a general cloud vs. bare metal performance difference.
> Beyond that, I don't have much idea what was happening there.
>
> Anthony
>
> --
> Resources:
> - http://web2py.com
> - http://web2py.com/book (Documentation)
> - http://github.com/web2py/web2py (Source code)
> - https://code.google.com/p/web2py/issues/list (Report Issues)
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "web2py-users" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/web2py/I6wii5TFERY/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.


Re: [web2py] Re: 50x performance improvement for web2py in TechEmpower Web Framework Benchmarks

2016-11-22 Thread Mark Graves
If I'm reading that correctly, doesn't that show web2py standard and
optimized  top 3?

Wouldn't that suggest a massive performance difference cloud vs baremetal?

That would be super strange, but I could be mistaken.

Would love to get a look at the errors  etc

On Mon, Nov 21, 2016 at 3:36 PM, Anthony <abasta...@gmail.com> wrote:

> On Monday, November 21, 2016 at 2:39:21 AM UTC-5, Mark Graves wrote:
>>
>> This is great news! Thank you for working on this, all of you.
>>
>> Any ability to check out the errors?
>>
>
> Not that I know of. Note, the errors occurred only on the 20-update
> requests when running on physical hardware (I know, technically everything
> is ultimately running on "physical hardware"). They also ran tests in the
> cloud (on Azure), and there web2py was very competitive, even with the
> 20-update requests. See:
>
> https://www.techempower.com/benchmarks/#section=data-r13;
> hw=cl=update=4ftgjj=35s-0=4=6=0-jz6rk-
> 4fti4g-0-9zldvk-1ekg-2
>
> In general, I think web2py's *relative *performance was slightly better
> on Azure vs. the physical hardware tests.
>
> Anthony
>
> --
> Resources:
> - http://web2py.com
> - http://web2py.com/book (Documentation)
> - http://github.com/web2py/web2py (Source code)
> - https://code.google.com/p/web2py/issues/list (Report Issues)
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "web2py-users" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/web2py/I6wii5TFERY/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.


Re: [web2py] Re: web2py react-python

2016-11-21 Thread Mark Graves
One other thing that popped into my head after reading Anthony's points
about search engine indexing would be permanent URI views (theoretically),
whereas with pure JS apps often my experience has been less than thrilling
with the routing capacities.

On Mon, Nov 21, 2016 at 3:41 PM, Anthony  wrote:

> On Monday, November 21, 2016 at 4:44:07 AM UTC-5, Leonel Câmara wrote:
>>
>> José a use case may be for graceful degradation when clients don't have
>> javascript.
>>
>
> The other typical use cases for server-side rendering are (a) support
> search engine indexing, and (b) faster rendering of the initial UI in the
> browser (the idea being that you send the HTML of the initial view to the
> browser, and then let the browser take over rendering from that point).
>
> Anthony
>
> --
> Resources:
> - http://web2py.com
> - http://web2py.com/book (Documentation)
> - http://github.com/web2py/web2py (Source code)
> - https://code.google.com/p/web2py/issues/list (Report Issues)
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "web2py-users" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/web2py/GwaHrT4Dqxg/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] web2py remote access

2016-11-21 Thread Mark C
Hello.  I've installed web2py on rhel 6 and have successfully connected to 
the admin interface (ssh tunneling), but was interested in calling 
controllers over port 80 from remote machines.  Just testing around now, so 
ssl is not required.  Many thanks for any thoughts.

I'm on the 2nd web2py video (hello world) by Di Pierro, so sorry if I'm on 
the verge of this information from the vid :)

-- 
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 react-python

2016-11-21 Thread Mark Graves
Way better use case Leonel, thanks =)

On Mon, Nov 21, 2016 at 3:44 AM, Leonel Câmara 
wrote:

> José a use case may be for graceful degradation when clients don't have
> javascript.
>
> --
> 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/GwaHrT4Dqxg/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: 50x performance improvement for web2py in TechEmpower Web Framework Benchmarks

2016-11-20 Thread Mark Graves
This is great news! Thank you for working on this, all of you.

Any ability to check out the errors?

Would love to know what that was.

On Saturday, November 19, 2016 at 2:16:18 PM UTC-6, Massimo Di Pierro wrote:
>
> Fantastic! Thank you Anthony, Michele, Simone, Richard, Paolo, Giovanni 
> and everybody who made this happen!
>
> On Thursday, 17 November 2016 19:17:48 UTC-6, Anthony wrote:
>>
>> TechEmpower just released Round 13 of its Web Framework Benchmarks. In 
>> previous rounds, web2py did very poorly because the original app that was 
>> submitted was using some inefficient code and was deployed with the 
>> development server rather than a production server. Here is a link to 
>> results from the previous round comparing web2py with Django and Flask: 
>> Round 
>> 12 
>> 
>> .
>>
>> I submitted a re-worked version of the web2py app for the new round. 
>> Although web2py is still slower than the other frameworks, its performance 
>> is now within the same order of magnitude as Django and Flask, with about a 
>> 5000% improvement from Round 12 relative to those frameworks. Notably, 
>> web2py is actually *faster *than Django and Flask on the "Multiple 
>> queries" task. Here is a link to the new results (again, comparing with 
>> Django and Flask): Round 13 
>> 
>>
>> Notice, in addition to a standard web2py setup, there is also a version 
>> labeled "web2py-optimized," which uses a few tricks to speed things up 
>> (e.g., disabling sessions and serving responses directly from model files).
>>
>> Note, in the bar chart, web2py's performance on the "Data updates" task 
>> looks particularly low. However, the bar chart reports only the requests 
>> with 20 updates -- web2py is more competitive with 10 updates, and superior 
>> with 5 updates (see the full data table 
>> ).
>>  
>> I'm not sure what happened with the 20-update requests (looks like there 
>> were lots of server errors generated) -- this was not a problem when 
>> testing on my VM (and on all the other tasks, performance was consistently 
>> *lower* on my VM than we see in the final public benchmarks).
>>
>> The web2py code can be found at 
>> https://github.com/TechEmpower/FrameworkBenchmarks/tree/master/frameworks/Python/web2py
>> .
>>
>> You can see the results for all frameworks tested at 
>> https://www.techempower.com/benchmarks/.
>>
>> Anthony
>>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] web2py react-python

2016-11-20 Thread Mark Graves
Hey Jose,

I can't necessarily tell you about react-python as I haven't used it.

I have however had interest in maintaining the ability to server side
render with the same templates as I use on a fully client side application.

I'd love to hear some input on this, but my thoughts are that it allows you
to maintain separation of concern, while leveraging the toolchain for both
languages.

On Sun, Nov 20, 2016 at 11:38 AM, José Luis Redrejo <jredr...@gmail.com>
wrote:

> I must confess my ignorance: Having read and played with react, and being
> a long time web2py user, I don't get the point of rendering react in the
> server from python, connected with a node application. I have made react
> applications running in the view and using json to communicate with the
> python controller, but react was always in the view and python in the
> controller.
> Can anybody tell me one use case or explain when could this pyhon-react
> setup make sense?
>
> Thanks
> José L.
>
> 2016-11-20 10:25 GMT+01:00 Mark Graves <mgrave...@gmail.com>:
>
>> Hey everyone,
>>
>> I recently stumbled across this:
>>
>> https://github.com/markfinger/python-react/issues/70#issueco
>> mment-254396083
>>
>> Just thought I'd share for anyone who was looking for something similar
>>
>> -Mark
>>
>> --
>> 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 a topic in the
> Google Groups "web2py-users" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/web2py/GwaHrT4Dqxg/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] web2py react-python

2016-11-20 Thread Mark Graves
Hey everyone,

I recently stumbled across this:

https://github.com/markfinger/python-react/issues/70#issuecomment-254396083

Just thought I'd share for anyone who was looking for something similar

-Mark

-- 
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: Redis Session Auth Issue

2016-08-10 Thread Mark Graves
I'm an idiot.

Put session below auth.

Ignore.

On Wednesday, August 10, 2016 at 8:13:55 PM UTC-5, Mark Graves wrote:
>
> Hey everyone,
>
> Having trouble tracking down a bug, looking for a sanity check.
>
> Somehow, when I turn on redis sessions, auth is not getting updated from 
> the session.
>
> This behavior manifests itself as a 303 with functions that are decorated 
> with @auth.requires.
>
> Basic Workflow:
>
>   Ajax request to login_bare -- > successfully logins in user
>
>  Further ajax requests to @auth.requires functions return 303.
>
> When I turn off redis, it works. 
>
>
> With redis on, it returns 303.
>
> Further complicating the matter is that when I check session.auth there is 
> a Storage object there with the user info in it.
>
> It just doesnt seem to be deserializing / updating auth.user from the 
> session when the session is stored in redis.
>
> Am I missing something?
>
> It doesnt matter whether i use with_lock or not.
>
> The user is there.
>
> auth is just not being updated.
>
> -Mark
>
>

-- 
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] Redis Session Auth Issue

2016-08-10 Thread Mark Graves
Hey everyone,

Having trouble tracking down a bug, looking for a sanity check.

Somehow, when I turn on redis sessions, auth is not getting updated from 
the session.

This behavior manifests itself as a 303 with functions that are decorated 
with @auth.requires.

Basic Workflow:

  Ajax request to login_bare -- > successfully logins in user

 Further ajax requests to @auth.requires functions return 303.

When I turn off redis, it works. 


With redis on, it returns 303.

Further complicating the matter is that when I check session.auth there is 
a Storage object there with the user info in it.

It just doesnt seem to be deserializing / updating auth.user from the 
session when the session is stored in redis.

Am I missing something?

It doesnt matter whether i use with_lock or not.

The user is there.

auth is just not being updated.

-Mark

-- 
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] Nginx & The Welcome App

2016-07-13 Thread Mark Billion
Nginx redirects my users from the website to the 
website/welcome/indexmy app is t4.  Ive tried to configure the Web2py 
sites enabled to fix it, but it fails.  Here is the w2p sites enabled 
fileany thoughts would be much appreciated.


server {
listen  80;
server_name $hostname;
###to enable correct use of response.static_version
#location ~* ^/(\w+)/static(?:/_[\d]+\.[\d]+\.[\d]+)?/(.*)$ {
#alias /home/www-data/web2py/applications/$1/static/$2;
#expires max;
#}
###

###if you use something like myapp = dict(languages=[en, it, jp], 
default_language=en) in your routes.py
#location ~* ^/(\w+)/(en|it|jp)/static/(.*)$ {
#alias /home/www-data/web2py/applications/$1/;
#try_files static/$2/$3 static/$3 =404;
#}
###
location ~* ^/(\w+)/static/ {
root /home/www-data/web2py/applications/t4;
#remove next comment on production
#expires max;
### if you want to use pre-gzipped static files (recommended)
### check scripts/zip_static_files.py and remove the comments
# include /etc/nginx/conf.d/web2py/gzip_static.conf;
###
}
location / {
#uwsgi_pass  127.0.0.1:9001;
uwsgi_pass  unix:///tmp/web2py.socket;
include uwsgi_params;
uwsgi_param UWSGI_SCHEME $scheme;
uwsgi_param SERVER_SOFTWAREnginx/$nginx_version;

###remove the comments to turn on if you want gzip compression 
of your pages
# include /etc/nginx/conf.d/web2py/gzip.conf;
### end gzip section

### remove the comments if you use uploads (max 10 MB)
#client_max_body_size 10m;
###
}
}
server {
listen 443 default_server ssl;
server_name $hostname;
ssl_certificate /etc/nginx/ssl/web2py.crt;
ssl_certificate_key /etc/nginx/ssl/web2py.key;
ssl_prefer_server_ciphers on;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 10m;
ssl_ciphers 
ECDHE-RSA-AES256-SHA:DHE-RSA-AES256-SHA:DHE-DSS-AES256-SHA:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA;
ssl_protocols SSLv3 TLSv1;
keepalive_timeout70;
location / {
#uwsgi_pass  127.0.0.1:9001;
uwsgi_pass  unix:///tmp/web2py.socket;
include uwsgi_params;
uwsgi_param UWSGI_SCHEME $scheme;
uwsgi_param SERVER_SOFTWAREnginx/$nginx_version;
###remove the comments to turn on if you want gzip compression 
of your pages
# include /etc/nginx/conf.d/web2py/gzip.conf;
### end gzip section
### remove the comments if you want to enable uploads (max 10 
MB)
#client_max_body_size 10m;
###
}
## if you serve static files through https, copy here the section
## from the previous server instance to manage static files

}

-- 
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] Segfault/Selenium/Web2py/Permissions

2016-07-03 Thread Mark Billion
I have a script that posts data to a third party form via PhantomJS.  It 
runs just fine on selenium in the python shell and when I run it in the W2P 
shell (python web2py.py -S *app* -M).  The problem is that when I call it 
from the controller via a click, I get this traceback.

I am assuming that the process is somehow interfering with itself but Ive 
spent 24 hours googling and found nothing.  Anyone have any thoughts?




1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.

Traceback (most recent call last):
  File "/home/www-data/web2py/gluon/restricted.py", line 227, in restricted
exec ccode in environment
  File "/home/www-data/web2py/applications/t4/controllers/default.py" 
, line 
5172, in 
  File "/home/www-data/web2py/gluon/globals.py", line 412, in 
self._caller = lambda f: f()
  File "/home/www-data/web2py/gluon/tools.py", line 3774, in f
return action(*a, **b)
  File "/home/www-data/web2py/applications/t4/controllers/default.py" 
, line 
4891, in file_now
driver = webdriver.PhantomJS(service_args=['--ignore-ssl-errors=true', 
'--ssl-protocol=TLSv1'])
  File 
"/usr/local/lib/python2.7/dist-packages/selenium/webdriver/phantomjs/webdriver.py",
 line 52, in __init__
self.service.start()
  File 
"/usr/local/lib/python2.7/dist-packages/selenium/webdriver/common/service.py", 
line 86, in start
self.assert_process_still_running()
  File 
"/usr/local/lib/python2.7/dist-packages/selenium/webdriver/common/service.py", 
line 99, in assert_process_still_running
% (self.path, return_code)
WebDriverException: Message: Service phantomjs unexpectedly exited. Status code 
was: -11






from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import Select
from selenium.common.exceptions import NoSuchElementException
from selenium.common.exceptions import NoAlertPresentException
import unittest, time, re
from selenium.webdriver.support import expected_conditions as EC


driver = webdriver.PhantomJS(service_args=['--ignore-ssl-errors=true', 
'--ssl-protocol=TLSv1'])
driver.get(*website*)
driver.find_element_by_name("login").clear()
driver.find_element_by_name("login").send_keys(*thing1*)
driver.find_element_by_name("key").clear()
driver.find_element_by_name("key").send_keys(*thing2*)
driver.find_element_by_name("redaction").click()
driver.find_element_by_name("button1").click()
driver.find_element_by_link_text("Bankruptcy").click()
driver.find_element_by_link_text("Case UpLoad").click()
#driver.find_element_by_name("case_1").clear()
driver.find_element_by_name("case_1").send_keys(hardpath+dox.case_information)
#driver.find_element_by_name("file_1").clear()
driver.find_element_by_name("file_1").send_keys(hardpath+dox.petition)
#driver.find_element_by_name("file_1_MTX").clear()
driver.find_element_by_name("file_1_MTX").send_keys(hardpath+dox.creditors)
#driver.find_element_by_name("configured_file_1").clear()
driver.find_element_by_name("configured_file_1").send_keys(hardpath+dox.ccc)
driver.find_element_by_name("button1").click()
driver.find_element_by_name("button1").click()

print driver.page_source

return driver.page_source

-- 
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] migrate uwsgi + nginx --> twisted

2016-06-08 Thread Mark Graves
Hey everyone,

I am migrating an app from uwsgi + nginx to twisted.

I've read the docs and can get it started on my local machine.

Now, I'm putting it on a separate box.

Does anyone have a service startup script that they would mind sharing?

Otherwise, any recommendations for further reading?

-Mark

-- 
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: Weird form issue

2016-06-06 Thread Mark Graves
Hey Jeff,

Most likely the date/time format.

If you can post a sample sqlite file and  SQLGRID code, happy to help.

-Mark


On Monday, June 6, 2016 at 12:42:16 PM UTC-7, Jeff Riley wrote:
>
> Sorry quick update.  Rows is returning information, so I must have a 
> problem with my javascript.  I still however cannot delete the record from 
> the SQLgrid view.
>
> On Monday, June 6, 2016 at 2:38:03 PM UTC-5, Jeff Riley wrote:
>>
>> Now I am truly confused.  I am able to submit the form and create the 
>> record in the database, but now 
>>
>> rows = db(db.training).select()  is not returning anything and I cannot 
>> delete the record from the SQLGrid view.  I have really wacked something up.
>>
>>
>> On Sunday, June 5, 2016 at 2:34:16 PM UTC-5, Jeff Riley wrote:
>>>
>>> Hello all.  I have built many forms in Web2py, but I clearly need 
>>> another set of eyes.  This form only works if I display every signal field 
>>> for some reason.  I am at a loss as to what I have set wrong.  I will add a 
>>> file with all the relevant code.  Thank you all very much for you help with 
>>> this.
>>>
>>

-- 
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: Weird form issue

2016-06-05 Thread Mark Graves
=)

You're welcome

Happens all the time to me, I find that I learn the most by listening to
others.

I couldn't figure it out too, so I dove in.  It caused me to rethink the
web2py form and db logic =)

-Mark


On Sun, Jun 5, 2016 at 4:36 PM, Jeff Riley <javajeff...@gmail.com> wrote:

> Seriously.  Well that is just embarrassing.  Thank you so much Mark for
> your help with this.  In looking back at the other 22 forms I have created,
> this is the first one where I was pre-populating any of the fields and not
> showing them.  Thank you for this valuable insight.
>
> All my best.
>
>
> On Sunday, June 5, 2016 at 6:14:35 PM UTC-5, Mark Graves wrote:
>
>> Hey Jeff,
>>
>> It looks like you created a sqlform expecting all fields, then the form
>> was expecting all fields back, but you only used some of them in the view,
>> so they were not processed.
>>
>> Specifically, the status field.
>>
>> You could either set the type of the field to hidden and include it or
>> only include some of the fields.
>>
>> see this repo:
>>
>> https://bitbucket.org/MarkGraves/service_scheduler
>>
>> Check out default/new_training
>>
>> It bugged me because the error seemed simple and I couldnt figure it out
>> =)
>>
>> -Mark
>>
>>
>> On Sunday, June 5, 2016 at 12:34:16 PM UTC-7, Jeff Riley wrote:
>>>
>>> Hello all.  I have built many forms in Web2py, but I clearly need
>>> another set of eyes.  This form only works if I display every signal field
>>> for some reason.  I am at a loss as to what I have set wrong.  I will add a
>>> file with all the relevant code.  Thank you all very much for you help with
>>> this.
>>>
>> --
> 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/fXKc3wNdPsU/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: Weird form issue

2016-06-05 Thread Mark Graves
Hey Jeff,

It looks like you created a sqlform expecting all fields, then the form was 
expecting all fields back, but you only used some of them in the view, so 
they were not processed.

Specifically, the status field.

You could either set the type of the field to hidden and include it or only 
include some of the fields.

see this repo:

https://bitbucket.org/MarkGraves/service_scheduler

Check out default/new_training

It bugged me because the error seemed simple and I couldnt figure it out =)

-Mark


On Sunday, June 5, 2016 at 12:34:16 PM UTC-7, Jeff Riley wrote:
>
> Hello all.  I have built many forms in Web2py, but I clearly need another 
> set of eyes.  This form only works if I display every signal field for some 
> reason.  I am at a loss as to what I have set wrong.  I will add a file 
> with all the relevant code.  Thank you all very much for you help with this.
>

-- 
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: Is there a way to make scheduler tasks be picked by workers up even quicker?

2016-06-03 Thread Mark Smith
I just tried switching to a simple ajax call and like you said and it's 
much faster (and there's no unresponsiveness :) ) on pythonanywhere. When I 
test it locally I see a bit of unresponsiveness but I think that's because 
pythonanywhere has webworkers while locally there's only a single 
non-threaded web2py process?

Thanks for all the help Niphlod! Really appreciate it :).

On Friday, 3 June 2016 14:18:33 UTC-4, Niphlod wrote:
>
> an ajax request is just like a user hitting a page. 
> They get queued until a thread from your web-workers is free (which is 
> usually ALWAYS the case) and it gets executed right away.
> It'll definitely be quicker than the IPC done by the scheduler if you want 
> semi-realtime execution.  
>
> On Friday, June 3, 2016 at 7:39:44 PM UTC+2, Mark Smith wrote:
>>
>> Thanks for the response :). I want to explain my situation a bit more if 
>> that's alright with you Niphlod (I'm a newbie at web dev haha). You're 
>> right, I think I can use a simple ajax request to do it instead, however I 
>> think the task may run a bit slower/make the UI a bit unresponsive? From my 
>> understanding every connection is handled by a single thread so it might be 
>> the case where a 1-2 second task would take 3-4 seconds to run and in that 
>> time the server wouldn't be able to handle any further tasks (like updating 
>> other UI?). Not sure if the previous statements are true however. In my 
>> case when the user clicks "submit" there's no other UI interaction until 
>> the server returns back the results of the task so I don't think the UI 
>> will be any slower (since it'll be an ajax request), but the task might 
>> actually take longer for the server to run (though anything less than 6 
>> seconds would be an improvement :) ).
>>
>> I'll try implementing it with just an ajax request (and no scheduler) and 
>> get back with the results. Thanks again for the helpful response!
>> On Friday, 3 June 2016 12:45:19 UTC-4, Niphlod wrote:
>>>
>>> long story short, no. 
>>> You can get better "pick-up-times" (the time that elapses from when you 
>>> queue the task to when it's started) with the redis version of the 
>>> scheduler but in any case the worst possible scenario won't drop under 
>>> "heartbeat" which is 3 seconds. 
>>> Got it, would be wonderful if the scheduler was even snappier than it is 
>>> but the current limitation just makes sense for small corner cases, 
>>> which are:
>>> - need to run the task on another server than the web-serving one
>>> - need to run zillions of tasks in a hundred workers farm to offload 
>>> something the webserver can't keep up
>>>
>>> That being said, there's another, which is "need to run tasks that go 
>>> beyond the 60 seconds timeout which is enforced in most webservers"... but 
>>> in that case waiting 6 seconds is not that much in comparison.
>>>
>>> The thing here is : 
>>> a) you're using pythonanywhere, so you're out of "worker farms"
>>> b) your tasks are super-duper-speedy (they complete well-below the usual 
>>> timeout for webserver which is 60 seconds) 
>>> c) you want sub-6 seconds "pick-up time" 
>>>
>>> why don't you just use a simple ajax request ?
>>>
>>>

-- 
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] dumbest question ever: how do you jump to line in the w2p ide

2016-06-03 Thread Mark Billion
I cant find this anywhere, but Ive seen it somewhere.  Say Im editing in 
the admin application and want to jump to line 1000.  Whats the key binding 
for it?

Feel free to heckle as long as you also provide the answer ;)

-- 
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 deployment: LetsEncrypt Nginx auto renew deployment script

2016-06-03 Thread Mark Graves
Anthony,

Any idea if the ISRG root CA is included in browsers yet?

https://community.letsencrypt.org/t/which-browsers-and-operating-systems-support-lets-encrypt/4394

This is the most recent article I could find but it is over 6 months old.

-Mark

On Fri, May 27, 2016 at 7:31 AM, Anthony <abasta...@gmail.com> wrote:

> On Friday, May 27, 2016 at 5:39:04 AM UTC-4, Mark Graves wrote:
>>
>> Thank Niphlod and Anthony.
>>
>> I agree.  The technology is not quite mainstream enough to really rely on
>> yet.
>>
>
> About a month ago, it was already the third largest certificate authority
> by number of certificates, and since then it has nearly doubled its number
> of issued certificates. Wordpress now offers it
> <https://en.blog.wordpress.com/2016/04/08/https-everywhere-encryption-for-all-wordpress-com-sites/>
> on all (million-plus) custom domains that they host. And it has been 
> integrated
> with the Caddy web server
> <https://caddyserver.com/blog/caddy-0_8-released> for automatic HTTPS.
>
> Anthony
>
> --
> Resources:
> - http://web2py.com
> - http://web2py.com/book (Documentation)
> - http://github.com/web2py/web2py (Source code)
> - https://code.google.com/p/web2py/issues/list (Report Issues)
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "web2py-users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/web2py/Mq_1YfEjrC8/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: Is there a way to make scheduler tasks be picked by workers up even quicker?

2016-06-03 Thread Mark Smith
Thanks for the response :). I want to explain my situation a bit more if 
that's alright with you Niphlod (I'm a newbie at web dev haha). You're 
right, I think I can use a simple ajax request to do it instead, however I 
think the task may run a bit slower/make the UI a bit unresponsive? From my 
understanding every connection is handled by a single thread so it might be 
the case where a 1-2 second task would take 3-4 seconds to run and in that 
time the server wouldn't be able to handle any further tasks (like updating 
other UI?). Not sure if the previous statements are true however. In my 
case when the user clicks "submit" there's no other UI interaction until 
the server returns back the results of the task so I don't think the UI 
will be any slower (since it'll be an ajax request), but the task might 
actually take longer for the server to run (though anything less than 6 
seconds would be an improvement :) ).

I'll try implementing it with just an ajax request (and no scheduler) and 
get back with the results. Thanks again for the helpful response!
On Friday, 3 June 2016 12:45:19 UTC-4, Niphlod wrote:
>
> long story short, no. 
> You can get better "pick-up-times" (the time that elapses from when you 
> queue the task to when it's started) with the redis version of the 
> scheduler but in any case the worst possible scenario won't drop under 
> "heartbeat" which is 3 seconds. 
> Got it, would be wonderful if the scheduler was even snappier than it is 
> but the current limitation just makes sense for small corner cases, 
> which are:
> - need to run the task on another server than the web-serving one
> - need to run zillions of tasks in a hundred workers farm to offload 
> something the webserver can't keep up
>
> That being said, there's another, which is "need to run tasks that go 
> beyond the 60 seconds timeout which is enforced in most webservers"... but 
> in that case waiting 6 seconds is not that much in comparison.
>
> The thing here is : 
> a) you're using pythonanywhere, so you're out of "worker farms"
> b) your tasks are super-duper-speedy (they complete well-below the usual 
> timeout for webserver which is 60 seconds) 
> c) you want sub-6 seconds "pick-up time" 
>
> why don't you just use a simple ajax request ?
>
>

-- 
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: Append fields within form, iteratively add fields inside form, List:string append, custom forms

2016-06-02 Thread Mark Graves
Hey Ron,

This looks like an architectural issue to me.

You have to maintain state somehow for the form2 vars.

You can either do this via javascript on the client side, then have only 
one form server side, which has a dynamic set of fields.

If i were to do it this way, I would use a javascript library similar 
to https://github.com/marioizquierdo/jquery.serializeJSON

I have used this in the past, and then set up the controller much more 
simply to handle storing and retrieving JSON.

If you need to do row by row processing, you can filter out the JSON and 
store it in rows server side,

Otherwise, you can store it server side, let me know if you want to chat 
about this offline.

-Mark

On Friday, May 27, 2016 at 2:22:16 PM UTC-7, Ron Chatterjee wrote:
>
> Running into some issues and hoping community help out with thoughts. How 
> do I append to list:string and using form inside a form (custom form). 
>
> Question: How do I append skill_and_experience  as a list:string into the 
> field added_term as 'English': '1 year', 'Math':'2 years',...etc. 
>
> May be there is a better way to do this, but this is how I started out 
> with. 
>
>
> *Model.py:*
>
> db.define_table( 'Experience',Field('Experience_level'), format = 
> '%(Experience_level)s')
> db.define_table( 'teaching',Field('teach_string'), format = 
> '%(teach_string)s')
>
>
> db.define_table( 'add_list_item',
> Field('skill_list', db.teaching, label='Enter Your Skills 
> sets', comment = 'Enter skills'),
> Field('Experience_list', db.Experience, label='Enter Your 
> Experience',  comment = 'Enter years'))
> 
>
> db.define_table( 'Project', 
> Field("Title", "string", 
> requires=IS_NOT_EMPTY(),default=None),
> Field("added_term", "list:string", 
> requires=IS_NOT_EMPTY()),)
>
>
>
> *Controller:*
> def create_table():
> a_list = 'My skills and experience:'
> skill_and_experience = [];
>  
> form1 = SQLFORM(db.Project)
> form2 = SQLFORM(db.add_list_item, submit_button=' + Add',).process()
> form2.element('input[type=submit]').update(_class='btn btn-custom')
> 
> if form2.accepted:
> a = db(db.add_list_item.id == form2.vars.id).select().first()
> skills = db(db.teaching.id == a.skill_list).select().first()
> experience = db(db.Experience.id == 
> a.Experience_list).select().first()
> skill_and_experience = skills.teach_string+':' +''+ 
> experience.Experience_level
> added_term.append(skill_and_experience)
> response.flash = T("Added Experience")
> 
> if form1.accepted:
> response.flash = T("success!")
> 
> return dict(form1 = form1, form2 = form2, a_list = a_list)
>
>
> *View:*
>
> {{extend 'layout.html'}}
>
> 
>
> {{=form1.custom.begin}}
>
>
> 
> {{=form1.custom.widget.Title}}
>  
> 
> {{=form2.custom.begin}}
>
> {{=a_list}}
>
>
>
> 
> 
>   
>   
>  
>{{=form2.custom.widget.skill_list}}   
>
> {{=form2.custom.widget.Experience_list}}   
>   
>  
>{{=form2.custom.submit}}
>   
> 
> 
>  
> 
> 
> {{=form2.custom.end}}
>   
>  {{=form1.custom.submit}}
> 
> 
>  
>   
> 
> 
> {{=form1.custom.end}}
> 
>
> 
> .input-title{
> height: 100px;
> width: 400px;
> }
>
> #add_list_item_skill_list{
>  width: 200px;
> } 
> #add_list_item_Experience_list{
>  width: 200px;
> } 
>
>
> .btn-custom { text-align:right;color: blue;width:50px; 
> padding:20%;position: relative;top: -4px;left: 4px;height 20px;}   
> 
>
>
>
> The idea is to basically add experience and training using form2 and add 
> that to form1 and then process both. But I am having problem in appending 
> data into list:string like I would for project. 
>
> Project.id 
> <http://127.0.0.1:8000/test_two/appadmin/select/db?orderby=Project2.id>
> Project.Title2 
> <http://127.0.0.1:8000/test_two/appadmin/select/db?orderby=Project2.Title2>
> Project.added_term2 
> <http://127.0.0.1:8000/test_two/appadmin/select/db?orderby=Project2.added_term2>
> 1 <http://127.0.0.1:8000/test_two/appadmin/update/db/Project2/1> test1 
> test1
> 2 <http://127.0.0.1:8000/test_two/appadmin/update/db/Project2/2> test2 test1, 
> test2, test3
> 3 <http://127.0.0.1:8000/test_two/appadmin/update/db/Project2/3> test3 
> test23, 
> test32
>

-- 
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 there a way to make scheduler tasks be picked by workers up even quicker?

2016-06-02 Thread Mark Smith
So I've been struggling with this issue for a while. Here's the scenario: 

The user selects their desired options and then clicks submit. The 
javascript then sends a POST request to a controller that adds a task to 
the task database. The javascript then polls every second to check on the 
status of the task and when the task is complete the results are sent back.

All of the tasks take max 1-2 seconds to run. However, it usually takes 
around 6 seconds for the scheduler to assign the task to a worker and for 
the worker to actually pick up and run the task (heartbeat is set to 2). 
Here's a log showing what I mean:

2016-06-02 01:33:00,657  - DEBUG - Adding task to scheduler
2016-06-02 01:33:00,670  - DEBUG - Done adding task to scheduler
2016-06-02 01:33:01,060  - DEBUG - scheduler_task: QUEUED
2016-06-02 01:33:03,253  - DEBUG - scheduler_task: QUEUED
2016-06-02 01:33:05,198  - DEBUG - scheduler_task: QUEUED
2016-06-02 01:33:07,196 - DEBUG - scheduler_task: ASSIGNED
2016-06-02 01:33:09,280 - DEBUG - new task report: COMPLETED

The time it takes from "Done adding task to schedule" to "new task report: 
COMPLETED" is about 8 seconds. Given that the tasks only take max 1-2 
seconds to run I would really like to cut down on the time it takes for it 
to be assigned and picked up by a worker.

Here's some more information (if you need anymore please tell me!):

In models I have *scheduler.py* where I initialize the scheduler:

import resultEngine // importing from the web2py modules directory
scheduler = Scheduler(taskdb, tasks=dict(getResult=resultEngine.getResult), 
heartbeat = 2)

In *default.py*:
def queueTask():
   session.task = scheduler.queue_task('getResult', [options_list], 
timeout=60, immediate=True)

I'm using sqlite as the database for the scheduler, I'm running my webapp 
on pythonanywhere and have 5 workers.

Is there a way to cut down on the time for a task to actually be picked up 
and run by a worker (to like 1 second)?. I spent a lot of time optimizing 
the tasks so that they could be run in 1-2 seconds so I really want to show 
snappy behaviour. Any help is appreciated! Loving 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.


Re: [web2py] Re: web2py deployment: LetsEncrypt Nginx auto renew deployment script

2016-05-27 Thread Mark Graves
Thank Niphlod and Anthony.

I agree.  The technology is not quite mainstream enough to really rely on
yet.

-Mark

On Thu, May 26, 2016 at 6:13 AM, Niphlod <niph...@gmail.com> wrote:

> better than http, for sure. Better than self-signed, an order of
> magnitude. But still I'd go for 60$ for basic cert for a production site
> rather than using letsentcypt.
>
>
> On Thursday, May 26, 2016 at 12:11:29 AM UTC+2, Mark Graves wrote:
>>
>> Has anyone used LetsEncrypt certificates or followed the instructions
>> below with web2py?
>>
>>
>> https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-14-04
>>
>> https://www.nginx.com/blog/free-certificates-lets-encrypt-and-nginx/
>>
>> What are your thoughts of the status of LetsEncrypt for a production
>> database despite its early status?
>>
>> Thanks!
>>
>> -Mark
>>
>>
>> --
> 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/Mq_1YfEjrC8/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] web2py deployment: LetsEncrypt Nginx auto renew deployment script

2016-05-25 Thread Mark Graves
Has anyone used LetsEncrypt certificates or followed the instructions below 
with web2py?

https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-14-04

https://www.nginx.com/blog/free-certificates-lets-encrypt-and-nginx/

What are your thoughts of the status of LetsEncrypt for a production 
database despite its early status?

Thanks!

-Mark


-- 
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: Computed DAL Values On Insert

2016-05-09 Thread Mark Billion
Yep

On Monday, May 9, 2016 at 12:19:13 PM UTC-4, Niphlod wrote:
>
> are all of the required fields of "storage_string()" supplied ?
>
> On Monday, May 9, 2016 at 5:25:21 PM UTC+2, Mark Billion wrote:
>>
>> When I do an insert the computed values dont updatethoughts?
>>
>> def storage_form_controller():
>> x = request.vars.client
>> sl_dict = {  'client':request.vars.client,
>>  'kind': request.vars.kind,
>>  'others_with_access': request.vars.others_with_access,
>>  'bank_name_address': request.vars.bank_name_address,
>>  'date_surrender_or_trans': 
>> request.vars.date_surrender_or_trans,
>> }
>> for a in range(0,5):
>> try:
>> sl_dict.update({'contents_%s' %str(a+1): 
>> request.vars.contents[a]})
>> except:
>> pass
>> 
>> ret = db.storage_lockers.validate_and_insert(**sl_dict)
>>
>>
>>
>> db.define_table('storage_lockers',
>> Field('client' , requires=IS_IN_DB(db, db.client.id), 
>> writable=False),
>> Field('kind', requires=IS_IN_SET(LOCKER)),
>> Field('others_with_access', 'string', length=100),
>> Field('bank_name_address', 'string', length=100),
>> Field('contents_1', requires=IS_NULL_OR(IS_IN_DB(db, db.asset.id, 
>> '%(Additional_Description)s'))),
>> Field('contents_2', requires=IS_NULL_OR(IS_IN_DB(db, db.asset.id, 
>> '%(Additional_Description)s'))),
>> Field('contents_3', requires=IS_NULL_OR(IS_IN_DB(db, db.asset.id, 
>> '%(Additional_Description)s'))),
>> Field('contents_4', requires=IS_NULL_OR(IS_IN_DB(db, db.asset.id, 
>> '%(Additional_Description)s'))),
>> Field('contents_5', requires=IS_NULL_OR(IS_IN_DB(db, db.asset.id, 
>> '%(Additional_Description)s'))),
>> Field('date_surrender_or_trans', 'string', length=100),
>> Field('content_string', compute=lambda r: storage_string(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: non W2p form insert

2016-05-09 Thread Mark Billion
It does indeed

On Monday, May 9, 2016 at 10:08:56 AM UTC-4, Niphlod wrote:
>
> try to prefix yourself with the following situation
>
> db.define_table('sometable', Field('somefield1'), Field('somefield2'))
>
> and then request.vars as
>
> {'somefield1' : 'abcd', 'somefield2' : 'cdef', '*contents*': 'wxyz'}
>
> trying to do db.sometable.validate_and_insert(**request.vars)
>
> will give you the exact same error ("Field *contents *does not belong to 
> the table")
>
>
>
> On Monday, May 9, 2016 at 3:11:51 PM UTC+2, Mark Billion wrote:
>>
>> Dumb question and even though I have rtmed I cannot seem to find what I 
>> am sure is right in front of me.
>>
>> I have a form that sends back data ordered by table name and I want to do 
>> something like 
>>
>> validate_and_insert(**request.vars)
>>
>> That being said, this doesnt work
>>
>>
>>
>>  Field contents does not belong to the 
>> tableVersion
>> web2py™ Version 2.12.3-stable+timestamp.2015.08.19.00.18.03
>> Python Python 2.7.6: /usr/local/bin/uwsgi (prefix: /usr)Traceback
>>
>> 1.
>> 2.
>> 3.
>> 4.
>> 5.
>> 6.
>> 7.
>> 8.
>> 9.
>> 10.
>> 11.
>> 12.
>> 13.
>> 14.
>>
>> Traceback (most recent call last):
>>   File "/home/www-data/web2py/gluon/restricted.py", line 227, in restricted
>> exec ccode in environment
>>   File "/home/www-data/web2py/applications/t4/controllers/default.py" 
>> <https://104.131.18.58/admin/default/edit/t4/controllers/default.py>, line 
>> 3560, in 
>>   File "/home/www-data/web2py/gluon/globals.py", line 412, in 
>> self._caller = lambda f: f()
>>   File "/home/www-data/web2py/applications/t4/controllers/default.py" 
>> <https://104.131.18.58/admin/default/edit/t4/controllers/default.py>, line 
>> 28, in storage_form_controller
>> ret = db.storage_lockers.insert(**request.vars)
>>   File "/home/www-data/web2py/gluon/packages/dal/pydal/objects.py", line 
>> 712, in insert
>> ret = self._db._adapter.insert(self, self._listify(fields))
>>   File "/home/www-data/web2py/gluon/packages/dal/pydal/objects.py", line 
>> 629, in _listify
>> 'Field %s does not belong to the table' % name)
>> SyntaxError: Field contents does not belong to the table
>>
>> Error snapshot [image: help] 
>> <https://104.131.18.58/admin/default/ticket/t4/75.150.158.78.2016-05-09.09-05-42.8ad1ae83-9f51-4100-b978-04eda00ba5c5#>
>>
>> Locals:
>> eld : 
>> fields : {'bank_name_address': 'd', 'client': '9', 'contents': '1141', 
>> 'date_surrender_or_trans': '1', 'id': '', 'kind': 'Storage Locker', 
>> 'others_with_access': 'dte'}
>> name : 'contents'
>> new_fields : {'bank_name_address': (, 'd'), 
>> 'client': (, '9'), 'date_surrender_or_trans': 
>> (, '1'), 'id': (, 
>> ''), 'kind': (, 'Storage Locker')}
>> self : > (id,client,kind,others_wi...ntents_5,date_surrender_or_trans,content_string)>
>> update : False
>> value : ''
>>
>

-- 
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] Computed DAL Values On Insert

2016-05-09 Thread Mark Billion
When I do an insert the computed values dont updatethoughts?

def storage_form_controller():
x = request.vars.client
sl_dict = {  'client':request.vars.client,
 'kind': request.vars.kind,
 'others_with_access': request.vars.others_with_access,
 'bank_name_address': request.vars.bank_name_address,
 'date_surrender_or_trans': 
request.vars.date_surrender_or_trans,
}
for a in range(0,5):
try:
sl_dict.update({'contents_%s' %str(a+1): 
request.vars.contents[a]})
except:
pass

ret = db.storage_lockers.validate_and_insert(**sl_dict)



db.define_table('storage_lockers',
Field('client' , requires=IS_IN_DB(db, db.client.id), writable=False),
Field('kind', requires=IS_IN_SET(LOCKER)),
Field('others_with_access', 'string', length=100),
Field('bank_name_address', 'string', length=100),
Field('contents_1', requires=IS_NULL_OR(IS_IN_DB(db, db.asset.id, 
'%(Additional_Description)s'))),
Field('contents_2', requires=IS_NULL_OR(IS_IN_DB(db, db.asset.id, 
'%(Additional_Description)s'))),
Field('contents_3', requires=IS_NULL_OR(IS_IN_DB(db, db.asset.id, 
'%(Additional_Description)s'))),
Field('contents_4', requires=IS_NULL_OR(IS_IN_DB(db, db.asset.id, 
'%(Additional_Description)s'))),
Field('contents_5', requires=IS_NULL_OR(IS_IN_DB(db, db.asset.id, 
'%(Additional_Description)s'))),
Field('date_surrender_or_trans', 'string', length=100),
Field('content_string', compute=lambda r: storage_string(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] non W2p form insert

2016-05-09 Thread Mark Billion
Dumb question and even though I have rtmed I cannot seem to find what I am 
sure is right in front of me.

I have a form that sends back data ordered by table name and I want to do 
something like 

validate_and_insert(**request.vars)

That being said, this doesnt work


Locals:
eld : 
fields : {'bank_name_address': 'd', 'client': '9', 'contents': '1141', 
'date_surrender_or_trans': '1', 'id': '', 'kind': 'Storage Locker', 
'others_with_access': 'dte'}
name : 'contents'
new_fields : {'bank_name_address': (, 'd'), 
'client': (, '9'), 'date_surrender_or_trans': 
(, '1'), 'id': (, 
''), 'kind': (, 'Storage Locker')}
self : 
update : False
value : ''

-- 
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: Weird Javascript Behavior -- 2 clicks to fire (Sorry, Dont know where else to turn)

2016-05-02 Thread Mark Billion
Ok. So here is the hackity-hack solution I came up with (if you cant beat 
em, join em):

parent.document.getElementsByClassName("iframe_input")[0].click();

I just force a click on the first input element when the modal hides and 
this seems to resolve the behavior.  That being said, this seems really 
hacky and Im all ears as to why this is wrong but it does work like a 
charm

On Friday, April 29, 2016 at 9:48:47 PM UTC-4, Stuart Rolinson wrote:
>
> Hi Mark,
>
> Can you pull together a simple example showing this with your HTML, CSS 
> and Javascript.  I understand what you are trying to do but I need to see 
> more in order to understand when the click event is being applied to the 
> .iframe_add objects.
>
> Thanks
> Stuart
>
> On Friday, April 29, 2016 at 1:17:24 PM UTC-7, Mark Billion wrote:
>>
>> Here's the script.  When I click it on load, works like a charm.  When I 
>> click it via a dynamically created element, the first click sees the actual 
>> html shift (kind of stretch and go back).  It does however work on the 
>> second click consistently. 
>>
>> 
>> $(document).on('click', '.iframe_add', function(){
>> var element = $(this).attr('name');
>> $('#iframe_target').html('<iframe src="
>> <a  rel="nofollow" href="https://104.131.18.58/t3/default/ajax_new_secured_asset_debt_creator?all=">https://104.131.18.58/t3/default/ajax_new_secured_asset_debt_creator?all=</a>'+element
>>  
>> +'" frameborder="0" width="580" height="300" scrolling="yes" 
>> id="myFrame"></iframe>');
>> });
>> 
>>
>> 
>>
>> Only thing I found is: 
>> http://stackoverflow.com/questions/24487664/jquery-on-click-doesnt-work-on-first-click-with-a-dynamic-element
>>
>> I dont really get whats going on and Id  appreciate any help.
>>
>

-- 
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] Weird Javascript Behavior -- 2 clicks to fire (Sorry, Dont know where else to turn)

2016-04-29 Thread Mark Billion
Here's the script.  When I click it on load, works like a charm.  When I 
click it via a dynamically created element, the first click sees the actual 
html shift (kind of stretch and go back).  It does however work on the 
second click consistently. 


$(document).on('click', '.iframe_add', function(){
var element = $(this).attr('name');
$('#iframe_target').html('');
});




Only thing I found 
is: 
http://stackoverflow.com/questions/24487664/jquery-on-click-doesnt-work-on-first-click-with-a-dynamic-element

I dont really get whats going on and Id  appreciate any help.

-- 
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: Execution of import statements

2016-04-29 Thread Mark Billion
Right, but if the import is a conditional one -- ie, only import a if a 
condition evals to true -- does it no op the import if the condition goes 
to false or does it import all and then execute?

On Friday, April 29, 2016 at 3:23:40 AM UTC-4, Niphlod wrote:
>
> in python if you have 
>
>
> import a
> blablabla
> import b
> blablabla
> import a
>
> the second "import a" statement is executed, but is a no-op.
>
> On Friday, April 29, 2016 at 1:20:59 AM UTC+2, Mark Billion wrote:
>>
>> I understand that the whole default.py file is executed on each request 
>> to a function internal to it. But does it import if the statement evaluates 
>> to false?
>>
>> For example if default.py has:
>>
>> Function x():
>>   If 1==2:
>> Import a
>>
>> Does a get imported every time function x is called?
>>
>>

-- 
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] Execution of import statements

2016-04-28 Thread Mark Billion
I understand that the whole default.py file is executed on each request to a 
function internal to it. But does it import if the statement evaluates to false?

For example if default.py has:

Function x():
  If 1==2:
Import a

Does a get imported every time function x is called?

-- 
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 return javascript on accept

2016-04-28 Thread Mark Billion
Thats brilliant, but when I put it in the script in, it doesnt work:

ajax_form = SQLFORM(db[field_array[3]], this_page_ajax, deletable=True)

if ajax_form.process().accepted:
response.js = 'alert("hi");'

The form is being called thru a modal and ajax iframe, but even when I just 
call it alone, it doesnt work:

$('.iframe_input').click(function(){
var element = $(this).attr('name');
$('#iframe_target').html('https://104.131.18.58/t3/default/ajax_form_creator?all='+element +'" 
frameborder="0" width="580" height="300" scrolling="yes" 
id="myFrame">');

});
 

On Wednesday, April 27, 2016 at 6:15:43 PM UTC-4, Leonel Câmara wrote:
>
> Hey Mark,
>
> Use response.js for that
>
> If form.process().accepted:
>
> #dont reload
>
> response.js = """
> $("#iframe_modal").remove();
> $('.modal-dialog').remove();
> """
>
>
>
>

-- 
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] SQLFORM emulate return false

2016-04-27 Thread Mark Billion


I want to have the SQLFORM submit, validate, and on success do absolutely 
nothing.  It would look like an html event equivalent to:

form onsubmit="myFunction(); return false;"


The problem is that actually injecting return false into the form means w2p 
doesnt validate.  Is there a simple way to prevent the form from doing anything 
--


Psuedocode:


If form.process().accepted:

DO NOTHING


Thoughts?

-- 
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: Ajax Form Update (and thank you for all the help)

2016-04-27 Thread Mark Billion
The problem is that Im at a loss. Right now, the process function calls 
next and sends to the default page.  

ajax_form = SQLFORM(db[field_array[3]], this_page_ajax, 
deletable=True).process(next = URL('default', field_array[4], 
vars=dict(cli=field_array[0])))

And Ive got it set up to deal with a situation where it returns something 
to the browser if accepted:

ajax_form = SQLFORM(db[field_array[3]], this_page_ajax, deletable=True)
if ajax_form.process().accepted:
return "fish"
'Fish' obviously displays, but I cant get it to send javascript that can be 
used to update the parent 

My next attempt is (onsuccess=success_func)

The problem with that is that I cannot think of a way to structure a 
function -- ie. success_func -- that would somehow write to the parent.

So I'm somewhat at a loss...I know Im supposed to supply more code, but Im 
just at loggerheads with this one and the only thing I can think of is to 
override the submit button with a HREF/Callback and direct the output to a 
div.  I have no problem doing that, or putting together a plugin for that 
matter, but I'm guessing there is a more elegant way to do this

On Monday, April 25, 2016 at 9:41:55 PM UTC-4, Massimo Di Pierro wrote:
>
> Can you show up some more code.
>
> On Monday, 25 April 2016 08:51:14 UTC-5, Mark Billion wrote:
>>
>> I have a form that is accessed through ajax and displayed in a 
>> modalRight now, on success, the modal clears and the parent page is 
>> reloaded, which then shows the data that was entered in the table.
>>
>> i.e., 
>>
>> ajax_form = SQLFORM(...).process(next = URL('default', page_name))
>>
>> {{for x in y:}}
>> 
>> x.idx.attr1x.attr2
>> 
>> {{pass}}
>>
>>
>> I want to prevent the parent from reloading and update the parent page 
>> via ajax on form success to include the data that is entered.  Can anyone 
>> point me to a script I can modify?
>>
>

-- 
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] Ajax Form Update (and thank you for all the help)

2016-04-25 Thread Mark Billion
I have a form that is accessed through ajax and displayed in a 
modalRight now, on success, the modal clears and the parent page is 
reloaded, which then shows the data that was entered in the table.

i.e., 

ajax_form = SQLFORM(...).process(next = URL('default', page_name))

{{for x in y:}}

x.idx.attr1x.attr2

{{pass}}


I want to prevent the parent from reloading and update the parent page via 
ajax on form success to include the data that is entered.  Can anyone point 
me to a script I can modify?

-- 
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: Cascade is killing me

2016-04-21 Thread Mark Billion
That fixed it!

On Thursday, April 21, 2016 at 3:30:39 PM UTC-4, Anthony wrote:
>
> Try with a fresh table and see if cascade works.
>
> On Thursday, April 21, 2016 at 3:27:25 PM UTC-4, Mark Billion wrote:
>>
>> It was added later.
>>
>> On Thursday, April 21, 2016 at 3:23:19 PM UTC-4, Anthony wrote:
>>>
>>> Was Income_Src a reference field when you first created the table, or 
>>> did you make that change later?
>>>
>>> On Thursday, April 21, 2016 at 2:16:10 PM UTC-4, Mark Billion wrote:
>>>>
>>>> No, I mean the first one.  I delete an income entry and the associated 
>>>> deduction entries still stick around.
>>>>
>>>> Btw, when I run MYSQL> SHOW CREATE TABLE deductions, I get: 
>>>>
>>>>  deductions | CREATE TABLE `deductions` (
>>>>   `id` int(11) NOT NULL AUTO_INCREMENT,
>>>>   `client` varchar(512) DEFAULT NULL,
>>>>   `Deduction_Type` varchar(512) DEFAULT NULL,
>>>>   `Income_Src` varchar(512) DEFAULT NULL,
>>>>   `Deduction_Amount` decimal(18,2) DEFAULT NULL,
>>>>   `B_22_Deduction_Amount` decimal(18,2) DEFAULT NULL,
>>>>   `Additional_Description` varchar(50) DEFAULT NULL,
>>>>   `deduction_type_string` varchar(512) DEFAULT NULL,
>>>>   `deduction_line_string` varchar(512) DEFAULT NULL,
>>>>   `income_src_cat` varchar(512) DEFAULT NULL,
>>>>   `income_src_string` varchar(512) DEFAULT NULL,
>>>>   PRIMARY KEY (`id`)
>>>> ) ENGINE=InnoDB AUTO_INCREMENT=302 DEFAULT CHARSET=utf8 |
>>>>
>>>>
>>>>
>>>>
>>>> On Thursday, April 21, 2016 at 2:11:34 PM UTC-4, Leonel Câmara wrote:
>>>>>
>>>>> Do you mean you delete something in table "income" and nothing is 
>>>>> deleted in "deductions"?
>>>>>
>>>>> Or do you mean you delete something from the set DEBTOR_TOGGLE_NO_BOTH 
>>>>> and no row is deleted in table "income"?
>>>>>
>>>>> The second one is obviously to be expected since cascading is a 
>>>>> database operation and the element you deleted would be in a set in your 
>>>>> code not in the dabatase.
>>>>>
>>>>

-- 
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: Cascade is killing me

2016-04-21 Thread Mark Billion
It was added later.

On Thursday, April 21, 2016 at 3:23:19 PM UTC-4, Anthony wrote:
>
> Was Income_Src a reference field when you first created the table, or did 
> you make that change later?
>
> On Thursday, April 21, 2016 at 2:16:10 PM UTC-4, Mark Billion wrote:
>>
>> No, I mean the first one.  I delete an income entry and the associated 
>> deduction entries still stick around.
>>
>> Btw, when I run MYSQL> SHOW CREATE TABLE deductions, I get: 
>>
>>  deductions | CREATE TABLE `deductions` (
>>   `id` int(11) NOT NULL AUTO_INCREMENT,
>>   `client` varchar(512) DEFAULT NULL,
>>   `Deduction_Type` varchar(512) DEFAULT NULL,
>>   `Income_Src` varchar(512) DEFAULT NULL,
>>   `Deduction_Amount` decimal(18,2) DEFAULT NULL,
>>   `B_22_Deduction_Amount` decimal(18,2) DEFAULT NULL,
>>   `Additional_Description` varchar(50) DEFAULT NULL,
>>   `deduction_type_string` varchar(512) DEFAULT NULL,
>>   `deduction_line_string` varchar(512) DEFAULT NULL,
>>   `income_src_cat` varchar(512) DEFAULT NULL,
>>   `income_src_string` varchar(512) DEFAULT NULL,
>>   PRIMARY KEY (`id`)
>> ) ENGINE=InnoDB AUTO_INCREMENT=302 DEFAULT CHARSET=utf8 |
>>
>>
>>
>>
>> On Thursday, April 21, 2016 at 2:11:34 PM UTC-4, Leonel Câmara wrote:
>>>
>>> Do you mean you delete something in table "income" and nothing is 
>>> deleted in "deductions"?
>>>
>>> Or do you mean you delete something from the set DEBTOR_TOGGLE_NO_BOTH 
>>> and no row is deleted in table "income"?
>>>
>>> The second one is obviously to be expected since cascading is a database 
>>> operation and the element you deleted would be in a set in your code not in 
>>> the dabatase.
>>>
>>

-- 
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: Cascade is killing me

2016-04-21 Thread Mark Billion
No, I mean the first one.  I delete an income entry and the associated 
deduction entries still stick around.

On Thursday, April 21, 2016 at 2:11:34 PM UTC-4, Leonel Câmara wrote:
>
> Do you mean you delete something in table "income" and nothing is deleted 
> in "deductions"?
>
> Or do you mean you delete something from the set DEBTOR_TOGGLE_NO_BOTH and 
> no row is deleted in table "income"?
>
> The second one is obviously to be expected since cascading is a database 
> operation and the element you deleted would be in a set in your code not in 
> the dabatase.
>

-- 
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] Cascade is killing me

2016-04-21 Thread Mark Billion
Parent table is income:

db.define_table('income',
   Field('client' , requires=IS_IN_DB(db, db.client.id), writable=False),
   
   Field('source', requires=IS_IN_SET(DEBTOR_TOGGLE_NO_BOTH),))

Child Table is deductions:

db.define_table('deductions',
   Field('client' , requires=IS_IN_DB(db, db.client.id), writable=False),
   .
   Field('Income_Src', 'reference income', requires=IS_IN_DB(db, 
db.income.id, '%(Employer_Name)s')),
   Field('Additional_Description' , 'string', length=50))

deductions.Income_Src references income.

When I delete an income source, it doesnt cascade.What am I missing? (I 
know this is an easy question, but I cant find the answer anywhere)

-- 
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] auth_user extra fields + row.to_dict()

2016-04-06 Thread Mark Graves
Ah!

Of course.

Thanks Anthony!

I knew it was something dumb i did =)

-Mark

On Wed, Apr 6, 2016 at 11:35 AM, Anthony <abasta...@gmail.com> wrote:

> table = db.auth_user
>> fields = ['id','first_name']
>> fields.append('test_field_1')
>>
>> query = table.id > 0
>>
>> row = db(query).select(*fields).first().as_dict()
>>
>
> The problem is that you aren't passing the correct arguments to .select().
> You must pass Field objects, not simply the string names of the fields. So,
> it should be:
>
> db(query).select(*[table[f] for f in fields]).first().as_dict()
>
> Now you will get a Row object with all the usual keys/values at the top
> level and no "_extra" sub-dictionary. In this case, the "T" and "F" values
> will be translated properly to True and False because now .select() knows
> the field types and does the proper parsing. When you simply pass field
> names to .select(), it doesn't have any information about the Field objects
> themselves -- it therefore doesn't know if a field is boolean and doesn't
> make the translation from "T"/"F" to True/False.
>
> Anthony
>
> --
> Resources:
> - http://web2py.com
> - http://web2py.com/book (Documentation)
> - http://github.com/web2py/web2py (Source code)
> - https://code.google.com/p/web2py/issues/list (Report Issues)
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "web2py-users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/web2py/JlAzUE46s_M/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.


Re: [web2py] auth_user extra fields + row.to_dict()

2016-04-06 Thread Mark Graves
Offending code from a fresh web2py welcome app:

in db.py

before auth.define_tables()

from gluon.contrib.populate import populate

auth.settings.extra_fields['auth_user'] = [Field('test_field_1','boolean')]

in controller default.py

def test():
if db(db.auth_user.id>0).isempty():
 populate(db.auth_user,10)

table = db.auth_user
fields = ['id','first_name']
fields.append('test_field_1')

query = table.id > 0

row = db(query).select(*fields).first().as_dict()

profile = {'auth_fields':row,
   "other_stuff":{"hello":False},
  "second_bool":False}

return response.json(profile)

This returns the following JSON response:

{"second_bool": false, "auth_fields": {"_extra": {"test_field_1": "T",
"first_name": "Corinne", "id": 1}}, "other_stuff": {"hello": false}}



On Wed, Apr 6, 2016 at 10:42 AM, Mark Graves <mgrave...@gmail.com> wrote:

> Hey Anthony and Richard,
>
> Yes you are both correct.
>
> I am attempting to create a usable JSON object.
>
> The confounding details from what I can tell are:
>
> 1.) the offending method is defined in a model file, which returns a
> dictionary, which is then json serialized via
>
> response.json(RETURNED_FROM_MODEL)
>
> This shouldn't be a problem.
>
> 2.) I am nesting the results of the row.as_dict() into another dictionary,
> which contains additional information ala.
>
> RETURNED_FROM_MODEL = {'row':row,'other_key':[]}
>
> The reason I moved the "extra" key into the dictionary manually is because
> when I did not, the row in the above line was returning it to me as a key
> in the json response.
>
> Its a nested serialization issue from what I can tell, because if I add
> another key into RETURNED_FROM_MODEL and set it explicitly as a boolean, it
> returns properly.  When I add a dictionary with a key that has a boolean
> value, it returns "T" or "F"
>
> I'm coming up with some example code now.
>
> On Wed, Apr 6, 2016 at 9:14 AM, Richard Vézina <
> ml.richard.vez...@gmail.com> wrote:
>
>> Yeah you right...
>>
>> On Wed, Apr 6, 2016 at 12:06 PM, Anthony <abasta...@gmail.com> wrote:
>>
>>> On Wednesday, April 6, 2016 at 11:30:34 AM UTC-4, Richard wrote:
>>>>
>>>> You maybe right Anthony abour update_record() it really depend though
>>>> of what he is trying todo...
>>>>
>>>
>>> Well at the point where row.update() is called, row is already a
>>> dictionary, so there is no .update_record() at that point. Also, the code
>>> is simply moving keys/values from the "extra" sub-dictionary into the
>>> top-level of the dictionary, so presumably the intention isn't to change
>>> anything in the database record.
>>>
>>> Anthony
>>>
>>> --
>>> Resources:
>>> - http://web2py.com
>>> - http://web2py.com/book (Documentation)
>>> - http://github.com/web2py/web2py (Source code)
>>> - https://code.google.com/p/web2py/issues/list (Report Issues)
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "web2py-users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to web2py+unsubscr...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
>> 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/JlAzUE46s_M/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.


Re: [web2py] auth_user extra fields + row.to_dict()

2016-04-06 Thread Mark Graves
Hey Anthony and Richard,

Yes you are both correct.

I am attempting to create a usable JSON object.

The confounding details from what I can tell are:

1.) the offending method is defined in a model file, which returns a
dictionary, which is then json serialized via

response.json(RETURNED_FROM_MODEL)

This shouldn't be a problem.

2.) I am nesting the results of the row.as_dict() into another dictionary,
which contains additional information ala.

RETURNED_FROM_MODEL = {'row':row,'other_key':[]}

The reason I moved the "extra" key into the dictionary manually is because
when I did not, the row in the above line was returning it to me as a key
in the json response.

Its a nested serialization issue from what I can tell, because if I add
another key into RETURNED_FROM_MODEL and set it explicitly as a boolean, it
returns properly.  When I add a dictionary with a key that has a boolean
value, it returns "T" or "F"

I'm coming up with some example code now.

On Wed, Apr 6, 2016 at 9:14 AM, Richard Vézina 
wrote:

> Yeah you right...
>
> On Wed, Apr 6, 2016 at 12:06 PM, Anthony  wrote:
>
>> On Wednesday, April 6, 2016 at 11:30:34 AM UTC-4, Richard wrote:
>>>
>>> You maybe right Anthony abour update_record() it really depend though of
>>> what he is trying todo...
>>>
>>
>> Well at the point where row.update() is called, row is already a
>> dictionary, so there is no .update_record() at that point. Also, the code
>> is simply moving keys/values from the "extra" sub-dictionary into the
>> top-level of the dictionary, so presumably the intention isn't to change
>> anything in the database record.
>>
>> Anthony
>>
>> --
>> Resources:
>> - http://web2py.com
>> - http://web2py.com/book (Documentation)
>> - http://github.com/web2py/web2py (Source code)
>> - https://code.google.com/p/web2py/issues/list (Report Issues)
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "web2py-users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to web2py+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> 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/JlAzUE46s_M/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] auth_user extra fields + row.to_dict()

2016-04-06 Thread Mark Graves
Hey everyone,

I saw a random bug in an app I'm working on, and I was wondering what the 
correct approach is.

I have auth.settings.extra_fields["auth_user"] = [LIST_OF_FIELDS]

later, I select that row and get it as a dict:

row = db(db.auth_user.id == user_id).select().first().as_dict()

then I get the extra fields and set them as normal attributes of the table

_f = row["extra"]

row.update(_f)

The problem is, some of these extra fields are booleans, but they are 
getting returned via JSON as "F" or "T"

I think its happening in the as_dict() method of the row object where it 
says:

d = dict(self) 
where self is a row object

Any thoughts?

-- 
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: constraints

2016-02-28 Thread Mark Graves
db.define_table('table_1_name',
Field('field_1_name','string'))

db.define_table('table_2_name',
Field('table_1_reference_field','reference table_1_name'))

It looks like you defined the field as an integer field and then are 
attempting to redefine it as a reference field.

-Mark

On Sunday, February 28, 2016 at 12:23:24 PM UTC-6, prashant joshi wrote:
>
>
>
> On Sunday, February 28, 2016 at 11:50:58 PM UTC+5:30, prashant joshi wrote:
>>
>> how to conecting table??
>> how to use refernce??
>>
>  
>  *Field('sid','integer', 'reference stud_person')*
> i use this
> it is correct???
>

-- 
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 on AWS

2016-01-24 Thread Mark Graves
Can you do ps -aux and see whether you can see rocket listening on port 80?

-Mark

On Mon, Jan 25, 2016 at 12:44 AM, Dave S <snidely@gmail.com> wrote:

>
>
> On Saturday, January 23, 2016 at 12:58:25 PM UTC-8, Mark Graves wrote:
>>
>> Re reading your answer,
>>
>> check the access logs.
>>
>> See if rocket is getting overwhelmed by robots or other spam traffic.
>>
>
> I'm not expecting that to be the case, but I will check.
>
>
>>
>> consider installing ip tables if thats the case or use nginx.
>>
>> -Mark
>>
>>
> /dps
>
>
>
>> On Saturday, January 23, 2016 at 1:46:56 AM UTC-6, Dave S wrote:
>>>
>>> I'm trying to set up a demo on an AWS free-tier linux system.  I'm
>>> running web2py in shake-the-box mode (sorry, model railroad talk ... I
>>> mean, "using the easy-to-assemble kit"), including the Rocket server.
>>> Installation was easy, I successfully untarred my app's w2p bundle, and
>>> fired up the python with the -i 0.0.0.0 argument.
>>>
>>> This all seems to work if I access from the VM's command line, using
>>> curl http://127.0.0.1/welcome, or the local subnet ip (
>>> http://169.XX.XX.XX/welcome), but not with the public IP (52.yy.yy.yy),
>>> and access from browsers not on the subnet times out, as well.  The EC2
>>> security group has had the http port opened.
>>>
>>> BTW, the same VM is also used for a demo FTP server, and some clients
>>> *can* reach the FTP server.
>>>
>>> Anyone else with experience on this?
>>>
>>> Dave
>>> /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 a topic in the
> Google Groups "web2py-users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/web2py/6AsSGM9MzVQ/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: web2py on AWS

2016-01-23 Thread Mark Graves
Re reading your answer,

check the access logs.

See if rocket is getting overwhelmed by robots or other spam traffic.

consider installing ip tables if thats the case or use nginx.

-Mark

On Saturday, January 23, 2016 at 1:46:56 AM UTC-6, Dave S wrote:
>
> I'm trying to set up a demo on an AWS free-tier linux system.  I'm running 
> web2py in shake-the-box mode (sorry, model railroad talk ... I mean, "using 
> the easy-to-assemble kit"), including the Rocket server.  Installation was 
> easy, I successfully untarred my app's w2p bundle, and fired up the python 
> with the -i 0.0.0.0 argument.  
>
> This all seems to work if I access from the VM's command line, using curl 
> http://127.0.0.1/welcome, or the local subnet ip (
> http://169.XX.XX.XX/welcome), but not with the public IP (52.yy.yy.yy), 
> and access from browsers not on the subnet times out, as well.  The EC2 
> security group has had the http port opened.
>
> BTW, the same VM is also used for a demo FTP server, and some clients 
> *can* reach the FTP server.
>
> Anyone else with experience on this?
>
> Dave
> /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 on AWS

2016-01-23 Thread Mark Graves
Hey Dave,

Any reason why you are choosing to use the rocket server and manual install?

I usually use the scripts from github as follows: (configurable, but ubuntu 
is easiest)

1. Create new ubuntu micro box.
2. ssh into box
3. wget 
https://raw.githubusercontent.com/web2py/web2py/master/scripts/setup-web2py-nginx-uwsgi-ubuntu.sh
4. chmod +x setup-web2py-nginx-uwsgi-ubuntu.sh
5. ./setup-web2py-nginx-uwsgi-ubuntu.sh


On Saturday, January 23, 2016 at 1:46:56 AM UTC-6, Dave S wrote:
>
> I'm trying to set up a demo on an AWS free-tier linux system.  I'm running 
> web2py in shake-the-box mode (sorry, model railroad talk ... I mean, "using 
> the easy-to-assemble kit"), including the Rocket server.  Installation was 
> easy, I successfully untarred my app's w2p bundle, and fired up the python 
> with the -i 0.0.0.0 argument.  
>
> This all seems to work if I access from the VM's command line, using curl 
> http://127.0.0.1/welcome, or the local subnet ip (
> http://169.XX.XX.XX/welcome), but not with the public IP (52.yy.yy.yy), 
> and access from browsers not on the subnet times out, as well.  The EC2 
> security group has had the http port opened.
>
> BTW, the same VM is also used for a demo FTP server, and some clients 
> *can* reach the FTP server.
>
> Anyone else with experience on this?
>
> Dave
> /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: multiple auth instances for one app

2015-12-22 Thread Mark Graves
Thanks Anthony.

Those are the considerations I was looking for.

Did you successfully implement this?

-Mark

On Tue, Dec 22, 2015 at 5:30 PM, Anthony <abasta...@gmail.com> wrote:

> Some previous discussion:
> https://groups.google.com/d/msg/web2py-developers/E9ug6m6WHhE/XkPjiojqTOIJ
>
>
> On Saturday, December 19, 2015 at 4:03:45 AM UTC-5, Mark Graves wrote:
>>
>> Hey everyone.
>>
>> Interesting question here.
>>
>> Has anyone ever used two instances of auth in the same app, on two
>> separate databases:
>>
>> eg.
>>
>> db1 = DAL()
>> db2 = DAL()
>>
>> auth1 = Auth(db1)
>> auth2 = Auth(db2)
>>
>> Would that run into any thread safety issues?
>>
>> -Mark
>>
> --
> 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/rXjJZZ4ZKDw/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.


Re: [web2py] Re: multiple auth instances for one app

2015-12-22 Thread Mark Graves
The basic use case is as such:

2 databases, 1 encrypted, 1 not

2 separate sets of users, 1 of which acts on the other set of users

Some users from the unencrypted database have access to the encrypted
database some do not.

I'm aware that someone getting access to the app side could decrypt the
encrypted database if i were to keep the encryption key(s) available.

Its more from application logic security, than low level security, where
two sets of users need to keep their data separate, but have access to
similar functions and some shared tables.



On Mon, Dec 21, 2015 at 4:37 PM, Mark Graves <mgrave...@gmail.com> wrote:

> I never said I was reasonable =)
>
> I'll come up with a description this evening.
>
> -Mark
>
> On Mon, Dec 21, 2015 at 12:11 PM, Massimo Di Pierro <
> massimo.dipie...@gmail.com> wrote:
>
>> I cannot think of a reasonable use case for this. Tell us more.
>>
>>
>> On Saturday, 19 December 2015 03:03:45 UTC-6, Mark Graves wrote:
>>>
>>> Hey everyone.
>>>
>>> Interesting question here.
>>>
>>> Has anyone ever used two instances of auth in the same app, on two
>>> separate databases:
>>>
>>> eg.
>>>
>>> db1 = DAL()
>>> db2 = DAL()
>>>
>>> auth1 = Auth(db1)
>>> auth2 = Auth(db2)
>>>
>>> Would that run into any thread safety issues?
>>>
>>> -Mark
>>>
>> --
>> 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/rXjJZZ4ZKDw/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.


Re: [web2py] Re: multiple auth instances for one app

2015-12-21 Thread Mark Graves
I never said I was reasonable =)

I'll come up with a description this evening.

-Mark

On Mon, Dec 21, 2015 at 12:11 PM, Massimo Di Pierro <
massimo.dipie...@gmail.com> wrote:

> I cannot think of a reasonable use case for this. Tell us more.
>
>
> On Saturday, 19 December 2015 03:03:45 UTC-6, Mark Graves wrote:
>>
>> Hey everyone.
>>
>> Interesting question here.
>>
>> Has anyone ever used two instances of auth in the same app, on two
>> separate databases:
>>
>> eg.
>>
>> db1 = DAL()
>> db2 = DAL()
>>
>> auth1 = Auth(db1)
>> auth2 = Auth(db2)
>>
>> Would that run into any thread safety issues?
>>
>> -Mark
>>
> --
> 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/rXjJZZ4ZKDw/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] multiple auth instances for one app

2015-12-19 Thread Mark Graves
Hey everyone.

Interesting question here.

Has anyone ever used two instances of auth in the same app, on two separate 
databases:

eg.

db1 = DAL()
db2 = DAL()

auth1 = Auth(db1)
auth2 = Auth(db2)

Would that run into any thread safety issues?

-Mark

-- 
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: Bug / Dumb Question a = b= []

2015-12-11 Thread Mark Billion
 -- thats a really good point!  I did not mean to do that!

On Wed, Dec 9, 2015 at 3:25 PM, Ron McOuat <ron.mco...@gmail.com> wrote:

> Are you sure you want to do that?
>
> a = b = []
>
> binds a and b to the same empty list object so whatever you do to a will
> also appear in b because they both reference the same list object.
> Assignment does not create a new object, it simply binds a variable name on
> the left to the object on the right.
>
> Try this:
>
> a = b = []
> a.insert(0,2)
> print a, b
>
> should print
> [2] [2]
>
> A great source of bugs if a and b are thought to be different objects.
>
> Ron
>
>
> On Tuesday, 8 December 2015 07:01:36 UTC-8, Mark Billion wrote:
>>
>> in python 2.6, I can run a = b = [] and get the expected result.  In W2P,
>> when I do it, it throws an exception as the list does not propagate to both
>> a & b.  It would make my code cleaner, but otherwise not a problem.  Just
>> wanted to give a shout in case anyone gave a 
>>
>> Thanks again for all of your help!
>>
> --
> 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/xCXgIDUZVnU/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.
>



-- 
Mark M. Billion
1904 N. Lincoln
Wilmington, DE 19806
302.416.2199

-- 
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] SELinux and web2py

2015-12-11 Thread Mark Graves
Well I ended up rebooting to ubuntu and nginx behind selinux and it fixed
itself =)

On Thu, Dec 10, 2015 at 7:12 PM, Richard Vézina <ml.richard.vez...@gmail.com
> wrote:

> Nop :
>
> ls -Z
>
> Should provide extended attribute : -rw-r--r--  root root
> system_u:object_r:etc_t  /etc/passwd
>
> Sorry in french :
> https://fr.wikipedia.org/wiki/SELinux
>
> I check english one and there where not this example...
>
> Then I don't know how you chage these exented attribute, there surely
> other exented command for that
>
> :D
>
> Richard
>
> On Thu, Dec 10, 2015 at 8:07 PM, Mark Graves <mgrave...@gmail.com> wrote:
>
>> Same permissions =(
>>
>> On Thu, Dec 10, 2015 at 7:05 PM, Mark Graves <mgrave...@gmail.com> wrote:
>>
>>> Its centos.  I'll check that now.  Its owned by apache
>>>
>>> On Thu, Dec 10, 2015 at 7:04 PM, Richard Vézina <
>>> ml.richard.vez...@gmail.com> wrote:
>>>
>>>> with ubuntu the default owner for web server content is www-data
>>>>
>>>> Richard
>>>>
>>>> On Thu, Dec 10, 2015 at 8:02 PM, Richard Vézina <
>>>> ml.richard.vez...@gmail.com> wrote:
>>>>
>>>>> Have you look to the welcome app user?
>>>>>
>>>>> ls -al
>>>>>
>>>>> Then
>>>>>
>>>>> chown -Rf same_welcome_app_user:same_welcome_app_user
>>>>>
>>>>> Richard
>>>>>
>>>>> On Thu, Dec 10, 2015 at 7:50 PM, Mark Graves <mgrave...@gmail.com>
>>>>> wrote:
>>>>>
>>>>>> Has anyone got any experience with selinux file permissions and
>>>>>> web2py?
>>>>>>
>>>>>> Somehow my sessions are not writing for the admin app but they are
>>>>>> for the welcome app...
>>>>>>
>>>>>> -Mark
>>>>>>
>>>>>> --
>>>>>> 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 a topic in the
>>>> Google Groups "web2py-users" group.
>>>> To unsubscribe from this topic, visit
>>>> https://groups.google.com/d/topic/web2py/SKPQ0DbCguE/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.
>>
>
> --
> 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/SKPQ0DbCguE/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.


Re: [web2py] SELinux and web2py

2015-12-10 Thread Mark Graves
Same permissions =(

On Thu, Dec 10, 2015 at 7:05 PM, Mark Graves <mgrave...@gmail.com> wrote:

> Its centos.  I'll check that now.  Its owned by apache
>
> On Thu, Dec 10, 2015 at 7:04 PM, Richard Vézina <
> ml.richard.vez...@gmail.com> wrote:
>
>> with ubuntu the default owner for web server content is www-data
>>
>> Richard
>>
>> On Thu, Dec 10, 2015 at 8:02 PM, Richard Vézina <
>> ml.richard.vez...@gmail.com> wrote:
>>
>>> Have you look to the welcome app user?
>>>
>>> ls -al
>>>
>>> Then
>>>
>>> chown -Rf same_welcome_app_user:same_welcome_app_user
>>>
>>> Richard
>>>
>>> On Thu, Dec 10, 2015 at 7:50 PM, Mark Graves <mgrave...@gmail.com>
>>> wrote:
>>>
>>>> Has anyone got any experience with selinux file permissions and web2py?
>>>>
>>>> Somehow my sessions are not writing for the admin app but they are for
>>>> the welcome app...
>>>>
>>>> -Mark
>>>>
>>>> --
>>>> 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 a topic in the
>> Google Groups "web2py-users" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/web2py/SKPQ0DbCguE/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] SELinux and web2py

2015-12-10 Thread Mark Graves
Has anyone got any experience with selinux file permissions and web2py?

Somehow my sessions are not writing for the admin app but they are for the 
welcome app...

-Mark

-- 
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] SELinux and web2py

2015-12-10 Thread Mark Graves
Its centos.  I'll check that now.  Its owned by apache

On Thu, Dec 10, 2015 at 7:04 PM, Richard Vézina <ml.richard.vez...@gmail.com
> wrote:

> with ubuntu the default owner for web server content is www-data
>
> Richard
>
> On Thu, Dec 10, 2015 at 8:02 PM, Richard Vézina <
> ml.richard.vez...@gmail.com> wrote:
>
>> Have you look to the welcome app user?
>>
>> ls -al
>>
>> Then
>>
>> chown -Rf same_welcome_app_user:same_welcome_app_user
>>
>> Richard
>>
>> On Thu, Dec 10, 2015 at 7:50 PM, Mark Graves <mgrave...@gmail.com> wrote:
>>
>>> Has anyone got any experience with selinux file permissions and web2py?
>>>
>>> Somehow my sessions are not writing for the admin app but they are for
>>> the welcome app...
>>>
>>> -Mark
>>>
>>> --
>>> 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 a topic in the
> Google Groups "web2py-users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/web2py/SKPQ0DbCguE/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] aws s3 uploadfs

2015-12-09 Thread Mark Graves
Hey everyone,

I've got an odd issue I've been experiencing.  

I uploaded about 10k files through the DAL into my local filesystem.

Then, I s3synced them, and mounted the s3 to the uploadfs for the DAL field.

The bucket and permissions for the keys and configuration works, because I 
accessed it via the command line and from the python interpreter manually. 
So I don't think its a configuration issue (but I could be wrong)

However using the field.retrieve() is not working.  It's giving me a 403 
error.

Any ideas on what I might look for in fixing this?

The error is coming in via both my custom code and appadmin, so I don't 
think its the code I wrote either.

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


  1   2   3   4   5   6   >