[web2py] Paypal Recurring Payments? Any experience? Any alternatives?

2014-03-31 Thread Mika Sjöman
Hi

I wonder if anyone here has implemented recurring payments with Paypal here 
with Web2py? Any experience with this and how to implement it?

We currently charge people for lessons with our teachers, but we would like 
to go over to a payment model where we automatically charge the customers 
every month. 

Is there a better way of doing this than Paypal? Market is mostly US and 
China based. 

Cheers

-- 
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] session2trash over ssh

2014-03-31 Thread Johann Spies
On my localhost there is no problem but on the server where I am logged in
through ssh I get

raise HTTP(200, T('Admin is disabled because insecure channel'))

when trying

nohup python web2py.py -S nkb -M -R scripts/sessions2trash.py 


So how am I supposed to run it on the server?

Regards
Johann

-- 
Because experiencing your loyal love is better than life itself,
my lips will praise you.  (Psalm 63:3)

-- 
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] We need a whats new section in the Web2py Admin page.

2014-03-31 Thread Jason Brower
It would be nice to have a way that you give your version to a server
and it responds with what is new both security, stability, and features.
It's a little annoying to see an update and have to check the features
to see if it is worth it to do the update.
BR,
Jason Brower


-- 
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 AJAX POST requests get serially serviced

2014-03-31 Thread Sandeep Gupta
Hi All

I've a setup on Amazon AWS, nginx - uwsgi - web2py. The db backend is 
mysql on Amazon RDB (earlier it was sqlite with same problem). On opening 
dashboard of the web2py application, it fires around 20 AJAX POST requests. 
However, the response is received serially in the browser. Also, if I try 
to open the same site in another tab of the browser, it does not open till 
all the AJAX requests are processed.

I understand that each request is handled by a new uwsgi worker (which 
actually would be a new web2py process). Following is the snapshot from 
uwsgi config:
processes = 8
master = true
harakiri = 60
reload-mercy = 8
cpu-affinity = 1
stats = /tmp/%n.stats.socket
max-requests = 2000

Each request is sent to 3rd party webserver by web2py application to check 
some status before a response is being returned. Python module 'requests' 
is being used for this purpose but without creating a separate thread/async 
task.

Could somebody guide me as to what could be the bottleneck 
(nginx/uwsgi/web2py app?) and how should I debug this further?

Br
Sandeep

-- 
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: Keep menu floating on top

2014-03-31 Thread Tom Clerckx
Fantastic!

Thanks for the responses!

Best regards,
Tom.

On Thursday, March 27, 2014 4:50:29 PM UTC+1, Tom Clerckx wrote:

 Is there an easy way to keep the menu 'floating' on top.
 I.e. when a user scrolls down that the menu stays visible at the top of 
 the page

 Best regards,
 Tom.


-- 
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] More than one field on POST with ReST

2014-03-31 Thread Carolina Nogueira
Hi guys!

I was trying to execute a POST using ReST inside a function. This post has 
two fields. When I try to do it with a curl, it works fine, but when I do 
exactly the same POST inside a function, it gives me an error.

On my model:
db.define_table('algorithm',
Field('name', 'string',length=255,unique=True),
Field('description', 'text'),
format='%(name)s')

And on my controller:

import requests
from requests.auth import HTTPBasicAuth

@request.restful()
def api():
response.view = 'generic.'+request.extension

def GET(*args,**vars):
patterns = 'auto'
parser = db.parse_as_rest(patterns,args,vars)
if parser.status == 200:
return dict(content=parser.response)
else:
raise HTTP(parser.status,parser.error)

def POST(table_name,**vars):
return db[table_name].validate_and_insert(**vars)

def PUT(table_name,record_id,**vars):
return db(db[table_name]._id==record_id).update(**vars)

def DELETE(table_name,record_id):
return db(db[table_name]._id==record_id).delete()
return dict(GET=GET, POST=POST, PUT=PUT, DELETE=DELETE)

def add_algorithm():

form to add new algorithms on database.

alg_form=SQLFORM.factory(Field('name', 
requires=IS_NOT_IN_DB(db,db.algorithm.name)),
 Field('description'),
 table_name='algorithm')

if alg_form.accepts(request,session):
payload = {'name':alg_form.vars.name, 
'description':alg_form.vars.description}
r = 
request.post(http://127.0.0.1:8000/webpricer/default/api/algorithm.json;, 
data=payload, auth=('user', 'pass'))
response.flash = payload
elif alg_form.errors:
response.flash = T('Please check for errors on form!')
else:
response.flash = T('Please fill the form')
return dict(alg_form=alg_form)

When I click to submit the values, I receive the following error:
type 'exceptions.TypeError'('NoneType' object is not callable)

The variables are as follow:
global request Storage {'_vars': None, 'function': 
'add_algori...ueira/Downloads/web2py/applications/webpricer/'}
request.post None
global data function data
global auth gluon.tools.Auth object
r undefined
payload {'description': 'Description', 'name': 'webpricer'}

For sure I'm doing something dumb, but I'm stuck on this error some days 
and can't found what I'm doing wrong... Didn't find any related error on 
past topics.





-- 
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: Cannot unzip the downloaded files from http://www.web2py.com/init/default/download

2014-03-31 Thread Antonis Loumiotis


On Friday, March 28, 2014 8:47:30 PM UTC+2, Dave S wrote:



 On Thursday, March 27, 2014 11:56:50 PM UTC-7, Antonis Loumiotis wrote:


 On Thursday, March 27, 2014 8:12:42 PM UTC+2, Dave S wrote:



 On Thursday, March 27, 2014 4:00:43 AM UTC-7, Antonis Loumiotis wrote:

 Hi,

 I'm trying to unzip (using 7-zip) the source code obtained from 
 http://www.web2py.com/init/default/download but I get the following 
 error:

 Can not open file 'C:\Documents and Settings\...\web2py_src.zip' as 
 archive.

 Actually I face the same problem with any of the files in 
 http://www.web2py.com/init/default/download.

 My operating system is Windows XP and I have already installed 
 Python27.   


 Any ideas?  I'm a newbie, just started teaching myself web programming 
 using Python...
  


 Nope, I don't have any ideas beyond ... broken download.  I've just done 
 a quick check of those downloads.  Beyond Compare has no trouble opening 
 the files using its archive handlers, and on Windows 8, explorer.exe 
 (Windows Explorer) is able to open the file (as a virtual folder) and 
 extract files (I opened VERSION in Notepad).

 Check the MD5 checksums of the download.It looks like you should get 
   4725AD01EE5AC287F8B4E0C33C48B230
 for web2py_win.zip.

 Oh, a second idea ... check 7zip for updates.

 /dps
  

 Thanks Dave for your help.

 I checked the MD5 hash using the Microsoft File Checksum Integrity 
 Verifier version 2.05 and I get
 e19d91843d6c2e7049f34febd9a24a1f 
 for web2py_win.zip.

 Antonis
  



 Is that from the For Normal Users link, or from the For Testers link?
 It looks like at the moment, those give the same results (as each other, 
 and matching the value I posted earlier) but that may not have been true 
 everyday of the last week.

 /dps


It seems that the issue is with the network at my work place.  For some 
reason that I do not understand it does not allow me to correctly download 
zip files.  I downloaded it from home and I had no issues to unzip it.

Thanks for your help,
Best,
Antonis  

  


-- 
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: Multiple AJAX POST requests get serially serviced

2014-03-31 Thread Massimo Di Pierro
It is a feature to ensure consistency of the data. You can serialize them 
by doing this at the top of your models:

if request.ajax: session._unlock(response)

On Monday, 31 March 2014 02:52:28 UTC-5, Sandeep Gupta wrote:

 Hi All

 I've a setup on Amazon AWS, nginx - uwsgi - web2py. The db backend is 
 mysql on Amazon RDB (earlier it was sqlite with same problem). On opening 
 dashboard of the web2py application, it fires around 20 AJAX POST requests. 
 However, the response is received serially in the browser. Also, if I try 
 to open the same site in another tab of the browser, it does not open till 
 all the AJAX requests are processed.

 I understand that each request is handled by a new uwsgi worker (which 
 actually would be a new web2py process). Following is the snapshot from 
 uwsgi config:
 processes = 8
 master = true
 harakiri = 60
 reload-mercy = 8
 cpu-affinity = 1
 stats = /tmp/%n.stats.socket
 max-requests = 2000

 Each request is sent to 3rd party webserver by web2py application to check 
 some status before a response is being returned. Python module 'requests' 
 is being used for this purpose but without creating a separate thread/async 
 task.

 Could somebody guide me as to what could be the bottleneck 
 (nginx/uwsgi/web2py app?) and how should I debug this further?

 Br
 Sandeep


-- 
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: More than one field on POST with ReST

2014-03-31 Thread Massimo Di Pierro
I need the complete traceback but I think the error is here:

 r = request.post(
http://127.0.0.1:8000/webpricer/default/api/algorithm.json;, data=payload, 
auth=('user', 'pass'))

there is no request.post, unless you imported something that overrides the 
default request object and you should not to that. Web2py replays on the 
existence of the global request object.

On Monday, 31 March 2014 08:04:52 UTC-5, Carolina Nogueira wrote:

 Hi guys!

 I was trying to execute a POST using ReST inside a function. This post has 
 two fields. When I try to do it with a curl, it works fine, but when I do 
 exactly the same POST inside a function, it gives me an error.

 On my model:
 db.define_table('algorithm',
 Field('name', 'string',length=255,unique=True),
 Field('description', 'text'),
 format='%(name)s')

 And on my controller:

 import requests
 from requests.auth import HTTPBasicAuth

 @request.restful()
 def api():
 response.view = 'generic.'+request.extension

 def GET(*args,**vars):
 patterns = 'auto'
 parser = db.parse_as_rest(patterns,args,vars)
 if parser.status == 200:
 return dict(content=parser.response)
 else:
 raise HTTP(parser.status,parser.error)

 def POST(table_name,**vars):
 return db[table_name].validate_and_insert(**vars)

 def PUT(table_name,record_id,**vars):
 return db(db[table_name]._id==record_id).update(**vars)

 def DELETE(table_name,record_id):
 return db(db[table_name]._id==record_id).delete()
 return dict(GET=GET, POST=POST, PUT=PUT, DELETE=DELETE)

 def add_algorithm():
 
 form to add new algorithms on database.
 
 alg_form=SQLFORM.factory(Field('name', requires=IS_NOT_IN_DB(db,
 db.algorithm.name)),
  Field('description'),
  table_name='algorithm')

 if alg_form.accepts(request,session):
 payload = {'name':alg_form.vars.name, 
 'description':alg_form.vars.description}
 r = request.post(
 http://127.0.0.1:8000/webpricer/default/api/algorithm.json;, 
 data=payload, auth=('user', 'pass'))
 response.flash = payload
 elif alg_form.errors:
 response.flash = T('Please check for errors on form!')
 else:
 response.flash = T('Please fill the form')
 return dict(alg_form=alg_form)

 When I click to submit the values, I receive the following error:
 type 'exceptions.TypeError'('NoneType' object is not callable)

 The variables are as follow:
 global request Storage {'_vars': None, 'function': 
 'add_algori...ueira/Downloads/web2py/applications/webpricer/'}
 request.post None
 global data function data
 global auth gluon.tools.Auth object
 r undefined
 payload {'description': 'Description', 'name': 'webpricer'}

 For sure I'm doing something dumb, but I'm stuck on this error some days 
 and can't found what I'm doing wrong... Didn't find any related error on 
 past topics.







-- 
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: Dynamically Creating a Form

2014-03-31 Thread horridohobbyist
Wow, thanks! Python is pretty amazing. (I come from a largely C background.)


On Monday, 31 March 2014 01:06:11 UTC-4, Anthony wrote:

 Yes, that will do it. form.vars (as well as request.vars and many other 
 web2py objects) is a gluon.storage.Storage object, which is much like a 
 dictionary and allows dictionary-like syntax for accessing items. Similar 
 syntax works with DAL Table and Row objects.

 Anthony

 On Monday, March 31, 2014 12:49:37 AM UTC-4, mweissen wrote:

 Try form.vars['color'] or take a variable v
 v=color
 form.vars[v]




 2014-03-31 2:32 GMT+02:00 horridohobbyist horrido...@gmail.comjavascript:
 :

 But if I create a name such as, for example, color, I'd need to access 
 the form variable thusly:  form.vars.color. Since the name was created on 
 the fly, how can I actually say form.vars.color?? If the name was created 
 and stored in a variable, say, x, I can't say form.vars.x. I guess I 
 don't quite understand Python's capabilities.


 On Sunday, 30 March 2014 20:00:56 UTC-4, Anthony wrote:

 Well, you need some way to dynamically create names for your fields as 
 well. Figure something out based on whatever you are using to construct 
 the 
 fields themselves.

 On Sunday, March 30, 2014 7:45:56 PM UTC-4, horridohobbyist wrote:

 Treating a form like a Python list works like a charm. However, having 
 dynamically added SELECT fields, I don't know how to extract the 
 form.vars 
 for these fields. I don't know how to assign _name in a way that I can 
 reference it after the form has been accepted. For example,

 elements = []
 for b in a:
 sel = []
 for c, val in a[b].iteritems():
 sel.append(string.capitalize(c)+':'+str(val))
 sel.sort()
 elements.append(TR(T(string.capitalize(b)),SELECT(sel,_
 name=???)))

 After a form.accepts, I need to access form.vars.??? to get the field 
 selection. But how do I know what the variable name is??


 On Saturday, 29 March 2014 09:21:59 UTC-4, Tim Richardson wrote:

 FORMs are just HTML helpers, so you manipulate them after creating 
 them.
 You can therefore just treat them like python lists, but there is 
 functionality which may be more helpful:

 http://web2py.com/books/default/chapter/29/05/the-
 views#Server-side-DOM-and-parsing



 On Sunday, 30 March 2014 00:11:27 UTC+11, horridohobbyist wrote:

 Is there a way for me to dynamically add form elements, such as 
 INPUT fields or SELECT fields, to a form? I'm not sure how to do this. 
 I'd 
 like to add these elements only under certain conditions.

 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+un...@googlegroups.com javascript:.
 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: Multiple AJAX POST requests get serially serviced

2014-03-31 Thread Anthony
And note that this is only an issue with file based sessions (the default), 
as the session file is locked for each request (unless explicitly 
unlocked). Database and cookie based sessions don't involve any locking. 
Note, in some cases, the locking is desirable, as it prevents race 
conditions if the requests are writing to the session.

Anthony

On Monday, March 31, 2014 9:37:09 AM UTC-4, Massimo Di Pierro wrote:

 It is a feature to ensure consistency of the data. You can serialize them 
 by doing this at the top of your models:

 if request.ajax: session._unlock(response)

 On Monday, 31 March 2014 02:52:28 UTC-5, Sandeep Gupta wrote:

 Hi All

 I've a setup on Amazon AWS, nginx - uwsgi - web2py. The db backend is 
 mysql on Amazon RDB (earlier it was sqlite with same problem). On opening 
 dashboard of the web2py application, it fires around 20 AJAX POST requests. 
 However, the response is received serially in the browser. Also, if I try 
 to open the same site in another tab of the browser, it does not open till 
 all the AJAX requests are processed.

 I understand that each request is handled by a new uwsgi worker (which 
 actually would be a new web2py process). Following is the snapshot from 
 uwsgi config:
 processes = 8
 master = true
 harakiri = 60
 reload-mercy = 8
 cpu-affinity = 1
 stats = /tmp/%n.stats.socket
 max-requests = 2000

 Each request is sent to 3rd party webserver by web2py application to 
 check some status before a response is being returned. Python module 
 'requests' is being used for this purpose but without creating a separate 
 thread/async task.

 Could somebody guide me as to what could be the bottleneck 
 (nginx/uwsgi/web2py app?) and how should I debug this further?

 Br
 Sandeep



-- 
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: We need a whats new section in the Web2py Admin page.

2014-03-31 Thread Niphlod
correction. The update is ALWAYS worth doing. It doesn't bring just new 
features, but also bug fixes.

On Monday, March 31, 2014 3:16:50 PM UTC+2, Encompass solutions wrote:

 It would be nice to have a way that you give your version to a server 
 and it responds with what is new both security, stability, and features. 
 It's a little annoying to see an update and have to check the features 
 to see if it is worth it to do the update. 
 BR, 
 Jason Brower 




-- 
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: Paypal Recurring Payments? Any experience? Any alternatives?

2014-03-31 Thread Greg Vaughan
Check out Stripe... https://stripe (dot) com/

Massimo has a library created here and there is some support in the docs...


On Monday, 31 March 2014 19:57:14 UTC+10, Mika Sjöman wrote:

 Hi

 I wonder if anyone here has implemented recurring payments with Paypal 
 here with Web2py? Any experience with this and how to implement it?

 We currently charge people for lessons with our teachers, but we would 
 like to go over to a payment model where we automatically charge the 
 customers every month. 

 Is there a better way of doing this than Paypal? Market is mostly US and 
 China based. 

 Cheers


-- 
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: Paypal Recurring Payments? Any experience? Any alternatives?

2014-03-31 Thread Massimo Di Pierro
Using stripe is very easy. You register and you ask web2py to give you a 
stripe payment form:

def pay(): 

from gluon.contrib.stripe import StripeForm 
   
form = StripeForm( 

pk=STRIPE_PUBLISHABLE_KEY, 

sk=STRIPE_SECRET_KEY,   
   
amount=150, # $1.5 (amount is in cents) 
   
description=Nothing).process()   

if form.accepted:   
   
payment_id = form.response['id']   

redirect(URL('thank_you')) 

elif form.errors:   
   
redirect(URL('pay_error')) 

return dict(form=form)  

The StripeForm generates all the HTML you need for the most secure 
transaction possible base don stripe rules. Using this the only addition 
requirement for you to be CISP compliant is serving the page over HTTPS. 
The card data never hit your server.

On Monday, 31 March 2014 11:44:05 UTC-5, Greg Vaughan wrote:

 Check out Stripe... https://stripe (dot) com/

 Massimo has a library created here and there is some support in the docs...


 On Monday, 31 March 2014 19:57:14 UTC+10, Mika Sjöman wrote:

 Hi

 I wonder if anyone here has implemented recurring payments with Paypal 
 here with Web2py? Any experience with this and how to implement it?

 We currently charge people for lessons with our teachers, but we would 
 like to go over to a payment model where we automatically charge the 
 customers every month. 

 Is there a better way of doing this than Paypal? Market is mostly US and 
 China based. 

 Cheers



-- 
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] for the experts among us

2014-03-31 Thread Massimo Di Pierro
https://www.youtube.com/watch?v=BKorP55Aqvgapp=desktop

-- 
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: GAE deployment problem with gluon.settings

2014-03-31 Thread Francisco García Claramonte
Hello all,

The problem persists.  But I fixed it upgrading to python 2.7.
With app.yaml parameters:

runtime: python27
threadsafe: true# true for WSGI  concurrent requests (Python 2.7 only)
default_expiration: 24h   # for static files

- url: .*
  script: gaehandler.wsgiapp# WSGI (Python 2.7 only)
  secure: optional

I suppose that it was my fault by using python 2.5.
Now it works perfectly.

Thanks.
Regards,
Francisco


2014-03-13 14:41 GMT+01:00 Massimo Di Pierro massimo.dipie...@gmail.com:
 I made a change in trunk about this. Can you please check it?


 On Thursday, 13 March 2014 06:56:32 UTC-5, Francisco García wrote:


 Hello all,

 I am trying to upload a Web2py application to GAE, as I use to do with
 other web2py apps (without problems).

 I find the following error in GAE logs:

 type 'exceptions.AttributeError': 'module' object has no attribute
 'settings'
 Traceback (most recent call last):
   File /base/data/home/apps/s~proy1/1.374388951966188608/gaehandler.py,
 line 47, in module
 from gluon.settings import global_settings
   File
 /base/data/home/apps/s~proy1/1.374388951966188608/gluon/__init__.py, line
 15, in module
 from globals import current
   File
 /base/data/home/apps/s~proy1/1.374388951966188608/gluon/globals.py, line
 24, in module
 from gluon.serializers import json, custom_json
   File
 /base/data/home/apps/s~proy1/1.374388951966188608/gluon/serializers.py,
 line 10, in module
 from gluon.languages import lazyT
   File
 /base/data/home/apps/s~proy1/1.374388951966188608/gluon/languages.py, line
 30, in module
 import gluon.settings as settings

 It looks like a circular error. I can't fix it.
 I tried to upload it with Web2py-2.9.4.

 Have you got some idea about the problem?.
 Thank you in advance for your support.

 Regards,
 Francisco


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



-- 
Francisco M. García Claramonte
Debian GNU/Linux Developer   franci...@debian.org
GPG: public key ID 556ABA51
http://people.debian.org/~francisco/
http://garciac.es - franci...@garciac.es

-- 
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: session2trash over ssh

2014-03-31 Thread Derek
You have to start web2py on a certain IP address, because it checks that IP 
address. For example, if you start it on 0.0.0.0, if he request to the site 
is not 0.0.0.0/admin then it will give you that message Admin is disabled 
because insecure channel. You should start it on the external IP address, 
then it will allow admin.

On Monday, March 31, 2014 3:05:02 AM UTC-7, Johann Spies wrote:

 On my localhost there is no problem but on the server where I am logged in 
 through ssh I get 

 raise HTTP(200, T('Admin is disabled because insecure channel'))

 when trying

 nohup python web2py.py -S nkb -M -R scripts/sessions2trash.py 


 So how am I supposed to run it on the server?

 Regards
 Johann

 -- 
 Because experiencing your loyal love is better than life itself, 
 my lips will praise you.  (Psalm 63:3)
  

-- 
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: displaying count and groupby

2014-03-31 Thread Dave S
On Thursday, March 27, 2014 9:23:14 AM UTC-7, Niphlod wrote:

(My apologies for the delayed reaction ... I held off replying until I 
tried the changes.)
 


 .
 return dict(rows=rows, count=count, groupby=groupby)



Thank you!  I can now show the peak in February (for the current list of 
birthday celebrants).


/dps
 


 On Thursday, March 27, 2014 9:21:01 AM UTC+1, Dave S wrote:


 I know I'm a bit slow, but ...

 On Wednesday, March 26, 2014 4:21:27 PM UTC-7, Dave S wrote:

 On Wednesday, March 26, 2014 12:58:36 PM UTC-7, Niphlod wrote:

 assuming.

 count = db.table.id.count()
 groupby = db.table.birthday.month()

 #you can do

 rows = db(db.table.id 0).select(count, groupby, groupby=groupby)
 for row in rows:
 print row[count], row[groupby]



 i.e. the variables (count, groupby) you set are automatically 
 translated to the ugly format you're referring to. 


 Okay, that looks good.



 Except for one tiny detail.  I don't want to print the results from the 
 controller, I want the view to display them.  And when I do the for loop in 
 the view,
 I get a ticket for NameError: name 'count' is not defined. How do I 
 get the desired results from my controller to the view and out on the 
 browser screen?

  

 This is the only recommended way to deal with those, because the 
 row['_extra'][web2py_extract('month',person.birthdate)]

 is only valid for a specific adapter (in this case, sqlite). This means 
 that if you switch to mysql, it won't work.













-- 
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: displaying count and groupby

2014-03-31 Thread Dave S


On Thursday, March 27, 2014 6:27:17 AM UTC-7, Johann Spies wrote:

 On 27 March 2014 10:21, Dave S snide...@gmail.com javascript: wrote



 Except for one tiny detail.  I don't want to print the results from the 
 controller, I want the view to display them.  


 What about

 rows = SQLTABLE( db(db.table.id 0).select(count, groupby, groupby=groupby
 )


I'm still missing something, as I don't get anything displayed by an 
{{=rows}}; I can pull apart the elements the same way I do for following 
Niphlod's advice, though.

/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: Web Editor Blank Screen

2014-03-31 Thread Derek
The 'canceled' message can be caused by a few different routes, either a 
navigation away to a different page, a user clicking the 'stop' button, or 
an ad blocker... you should look at your network data to get better 
answers. 

http://dev.chromium.org/for-testers/providing-network-details

There are other situations that chrome will cancel requests, such as the 
dom object which caused the request getting deleted, or another request 
going to the same server had an error (it will stop the request to prevent 
from getting another error).

I'd hazard a guess and say it's likely a dom object getting deleted, but 
you'll have to investigate further. If this happens a lot with your RPI it 
could be an indication of the server returning an error (and chrome cancels 
pending requests).


On Friday, March 28, 2014 7:18:38 PM UTC-7, James Ryan wrote:

 Hi guys,

 Having an issue with the web editor. Other's have experienced this problem 
 before with no resolution:

 https://groups.google.com/forum/#!topic/web2py/fIuUAqdSieQ

 https://groups.google.com/forum/#!topic/web2py/SxYJX90zszY

 http://comments.gmane.org/gmane.comp.python.web2py/120843

 I'm running web2py on a raspberry pi on the local network. I can access it 
 fine, log into the admin interface, create a new app, and peek at the 
 files. When I go to edit any files the page loads but the file doesn't. 
 I've tried on multiple machines and browsers. The raspberry pi is headless 
 and doesn't have xserver so I can't try locally.

 Using Chrome's debugger I can see the http request being cancelled and 
 there's no response data in the header

 http://imgur.com/5HUd3cp

 http://imgur.com/wBPwRRl

 Looking at /var/log/apache2/access.log the http request returns 200 OK

 Any thoughts what this might be?






-- 
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: I'd like to know what is a suitable tool to generate document templates.

2014-03-31 Thread Derek
Word can make clean HTML if you choose to save as Web Page Filtered. It's 
default is to add a bunch of office specific tags so that you can load it 
back into office and it will retain all the properties not supported by the 
HTML exporter. 

On Wednesday, March 26, 2014 10:30:05 AM UTC-7, Omar Meat Boy Gutiérrez 
wrote:

 Thanks for the answer Massimo, 

 We discarded MS Word to HTML conversion because we have problems with the 
 code generated (we have a kind of preview in HTML)

 Thanks to mention Reportlab, we are using xhtml2pdf Pisa tool. 

 Cheers


 On Wed, Mar 26, 2014 at 10:55 AM, Massimo Di Pierro 
 massimo@gmail.comjavascript:
  wrote:

 MS Word documents can be easily be converted to HTML because Word can 
 export to HTML. The resulting HTML is terrible and not humanly readable, 
 but works.
 If you use markmin notice in web2py there is a 
 gluon.contrib.markmin.markmin2pdf which is designed to generate documents. 
 markmin is more powerful then markdown.
 You may also want to look into reportlab.

 On Wednesday, 26 March 2014 11:16:40 UTC-5, Omar Meat Boy Gutiérrez wrote:


 Hi everyone, 

 I'd like to discuss with you about your experience with document 
 templates.

 *I have the next problem:*

 a) A customer want to generate different kinds of documents. He creates 
 the `templates` using programs like Word. 
 b) I receive the document and I need to convert it to HTML. 

 *What I need is the next:*

 A tool intended to be used by the customer where he can to generate 
 `templates` adding special fields, tables, titles.

 My boss is thinking in use markmin, I guess markdown is also a good 
 choice. 

 According to your experience, what other tool can be used? Is it markmin 
 a good choice? Am I missing something?

 Greetings

  -- 
 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/vkmSNzY3oTA/unsubscribe.
 To unsubscribe from this group and all its topics, send an email to 
 web2py+un...@googlegroups.com javascript:.
 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: Alternative to reCaptcha?

2014-03-31 Thread Derek
Why would you want to? All you'd have to do to bypass that captcha is to 
call a line of javascript. The validation is all client side.

On Tuesday, March 25, 2014 11:58:18 PM UTC-7, marco mansilla wrote:

 Hi, I've been looking for some alternative to *Captcha, and so far I 
 haven't found somethig original... until now, this[0] looks interesting, 
 and seems not to be hard to use. 

 Any ideas about if is possible to integrate it with SQLFORM? 

 [0] https://github.com/josscrowcroft/MotionCAPTCHA 

 Thanks in advance. 

 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] Re: Web Editor Blank Screen

2014-03-31 Thread Derek
also, make sure you have this line in your apache config...

Header always append X-Frame-Options SAMEORIGIN


On Monday, March 31, 2014 11:25:23 AM UTC-7, Derek wrote:

 The 'canceled' message can be caused by a few different routes, either a 
 navigation away to a different page, a user clicking the 'stop' button, or 
 an ad blocker... you should look at your network data to get better 
 answers. 

 http://dev.chromium.org/for-testers/providing-network-details

 There are other situations that chrome will cancel requests, such as the 
 dom object which caused the request getting deleted, or another request 
 going to the same server had an error (it will stop the request to prevent 
 from getting another error).

 I'd hazard a guess and say it's likely a dom object getting deleted, but 
 you'll have to investigate further. If this happens a lot with your RPI it 
 could be an indication of the server returning an error (and chrome cancels 
 pending requests).


 On Friday, March 28, 2014 7:18:38 PM UTC-7, James Ryan wrote:

 Hi guys,

 Having an issue with the web editor. Other's have experienced this 
 problem before with no resolution:

 https://groups.google.com/forum/#!topic/web2py/fIuUAqdSieQ

 https://groups.google.com/forum/#!topic/web2py/SxYJX90zszY

 http://comments.gmane.org/gmane.comp.python.web2py/120843

 I'm running web2py on a raspberry pi on the local network. I can access 
 it fine, log into the admin interface, create a new app, and peek at the 
 files. When I go to edit any files the page loads but the file doesn't. 
 I've tried on multiple machines and browsers. The raspberry pi is headless 
 and doesn't have xserver so I can't try locally.

 Using Chrome's debugger I can see the http request being cancelled and 
 there's no response data in the header

 http://imgur.com/5HUd3cp

 http://imgur.com/wBPwRRl

 Looking at /var/log/apache2/access.log the http request returns 200 OK

 Any thoughts what this might be?






-- 
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: Alternative to reCaptcha?

2014-03-31 Thread Anthony
Also, doesn't seem to work with touch.

On Monday, March 31, 2014 2:38:21 PM UTC-4, Derek wrote:

 Why would you want to? All you'd have to do to bypass that captcha is to 
 call a line of javascript. The validation is all client side.

 On Tuesday, March 25, 2014 11:58:18 PM UTC-7, marco mansilla wrote:

 Hi, I've been looking for some alternative to *Captcha, and so far I 
 haven't found somethig original... until now, this[0] looks interesting, 
 and seems not to be hard to use. 

 Any ideas about if is possible to integrate it with SQLFORM? 

 [0] https://github.com/josscrowcroft/MotionCAPTCHA 

 Thanks in advance. 

 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.


Re: [web2py] Re: How to use AJAX within a SQLFORM.grid 'add' form

2014-03-31 Thread Keith Edmunds
Thanks Anthony.

 First, take grid out of BEAUTIFY -- not necessary.

Thanks, done.

 Does db.t_dogs happen to have a field called name? If so, change the
 name of your extra input element to something other than name.

No, it doesn't.

 Also, when typing in your input field, open the browser developer tools
 and see if (a) you get any JavaScript errors in the console 

No.

 and (b) an
 Ajax request gets sent to the server.

Yes - but I knew that because I get a change in the display. It just
isn't the change expected. To reiterate, when the Add form is displayed -
in other words, while the grid is *not* displayed - typing in the form
displays the whole grid in the Ajax target area.
-- 
Blog: http://goo.gl/iOwv1w

You can't live a perfect day without doing something for someone 
who will never be able to repay you.

-- 
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: How to use AJAX within a SQLFORM.grid 'add' form

2014-03-31 Thread Anthony


  Ajax request gets sent to the server. 

 Yes - but I knew that because I get a change in the display. It just 
 isn't the change expected. To reiterate, when the Add form is displayed - 
 in other words, while the grid is *not* displayed - typing in the form 
 displays the whole grid in the Ajax target area.


Please remember to use the URL function when generating web2py URLs. This:

ajax('echo', ['name'], 'target')

is wrong. 'echo' is a relative URL, so will simply be appended to the URL 
of the current page. It works accidentally when the main grid is loaded 
because the page URL is probably just /myapp, so the request goes to 
/myapp/echo, which translates to /myapp/default/echo if you've got the 
default controller set. However, when the create form is loaded, the URL 
will be something like /myapp/new/t-dogs or 
/myapp/default/index/new/t-dogs, and the request will go to 
/myapp/default/index/new/t-dogs/echo. In that case, the echo will simply 
be ignored, and you'll just get the grid back. Instead, it should be:

ajax('{{=URL(default, echo)}}', ['name'], 'target')

When debugging Ajax requests, always check what request is made in the 
browser. In this case, you would have seen that the request is going to the 
wrong URL.

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] Re: How to use AJAX within a SQLFORM.grid 'add' form

2014-03-31 Thread Keith Edmunds
Really helpful, thanks Anthony.

One suggestion: Chapter 11 of the book, heading The ajax function, has
exactly the code I used (that's where I got it from):

form
   input name=name onkeyup=ajax('echo', ['name'], 'target') /
/form

May I suggest that your comment about URLs be included in that
documentation?

Appreciate the help, thanks.

Keith
-- 
Blog: http://goo.gl/iOwv1w

You can't live a perfect day without doing something for someone 
who will never be able to repay you.

-- 
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] Init Script in Web2Py

2014-03-31 Thread Jay Martin
I'm confused as to why this scenario needs caching.

Isn't it true that for an empty user table:

if cache.ram('init',lambda:db(db.auth_user).isempty(),None):
   arbitrary_function()

will only cache the boolean value True and keep that value (True) in cache 
forever (until the app is restarted), associated with the given key 'init'?

Therefore, only this initial state is remembered. All future executions of 
this code will only ever return this initial value (True), therefore the 
subsequent arbitrary function will continue to be executed every cycle of 
execution.

Am I missing something? Many thanks!



On Friday, August 10, 2012 11:23:56 PM UTC-4, Massimo Di Pierro wrote:

 you stil want to cache that

 if cache.ram('init',lambda:db(db.mytable).isempty(),None):




-- 
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: Paypal Recurring Payments? Any experience? Any alternatives?

2014-03-31 Thread Matheus Cardoso
For sure, using Stripe is way more easier than I ever seen or used. 
However, it seems that it is a paid service. So you can do with Requests, 
for instance, and for free (at least the development part). I did something 
like 
thathttps://github.com/matheuscas/hackathon_paypal/blob/master/controllers/paypal.pyin
 PayPal Hackathon in Campus Party Brasil 2014 in São Paulo, Brazil. The 
code is not good, cuz the invoices are fixed on the code and some parts are 
in portuguese. But, you can focus on something like this:


def create_recurring_payments_profile():

 basic_data = basic_request
 recurring_payments_data = {
 'METHOD':'CreateRecurringPaymentsProfile',
 'TOKEN':request.vars['TOKEN'],
 'PAYERID':request.vars['PAYERID'],
 'PROFILESTARTDATE': request.now,
 'DESC': 'Revista Info',
 'BILLINGPERIOD': 'Day',
 'BILLINGFREQUENCY': '1',
 'AMT': 100,
 'CURRENCYCODE': 'BRL',
 'COUNTRYCODE': 'BR',
 'MAXFAILEDPAYMENTS': 3
 }


 basic_data.update(recurring_payments_data)
 r = requests.get(sandbox, params=basic_data)
 return dict(details=__response_details_to_dict(r.text))


Worked like a charm. ;)

On Monday, March 31, 2014 6:57:14 AM UTC-3, Mika Sjöman wrote:

 Hi

 I wonder if anyone here has implemented recurring payments with Paypal 
 here with Web2py? Any experience with this and how to implement it?

 We currently charge people for lessons with our teachers, but we would 
 like to go over to a payment model where we automatically charge the 
 customers every month. 

 Is there a better way of doing this than Paypal? Market is mostly US and 
 China based. 

 Cheers


-- 
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] New Merchant service -- WePay.com

2014-03-31 Thread Joe Barnhart
These guys look very much like Stripe.com as credit-card merchant service 
providers -- that is to say, VERY good!

Two differences stand out -- WePay can process electronic checks as well as 
credit cards, an advantage not shared by Stripe.  Also, the WePay API is 
based on OAuth2, which seems like an odd choice, but maybe only because I 
know nothing about OAuth2.

Look over their service and comment on how easy/hard it would be to 
integrate with web2py.  I'm happy with Stripe.com, but if experience has 
taught me anything its to always have an alternative!

http://wepay.com

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


Re: [web2py] Re: How to use AJAX within a SQLFORM.grid 'add' form

2014-03-31 Thread Anthony
Yes, that should be fixed.

On Monday, March 31, 2014 3:47:54 PM UTC-4, backseat wrote:

 Really helpful, thanks Anthony. 

 One suggestion: Chapter 11 of the book, heading The ajax function, has 
 exactly the code I used (that's where I got it from): 

 form 
input name=name onkeyup=ajax('echo', ['name'], 'target') / 
 /form 

 May I suggest that your comment about URLs be included in that 
 documentation? 

 Appreciate the help, thanks. 

 Keith 
 -- 
 Blog: http://goo.gl/iOwv1w 

 You can't live a perfect day without doing something for someone 
 who will never be able to repay you. 


-- 
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: for the experts among us

2014-03-31 Thread samuel bonill

thanks for sharing it massimo...

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


Re: [web2py] Re: How to use AJAX within a SQLFORM.grid 'add' form

2014-03-31 Thread Anthony
I updated the example in the book.

On Monday, March 31, 2014 6:09:11 PM UTC-4, Anthony wrote:

 Yes, that should be fixed.

 On Monday, March 31, 2014 3:47:54 PM UTC-4, backseat wrote:

 Really helpful, thanks Anthony. 

 One suggestion: Chapter 11 of the book, heading The ajax function, has 
 exactly the code I used (that's where I got it from): 

 form 
input name=name onkeyup=ajax('echo', ['name'], 'target') / 
 /form 

 May I suggest that your comment about URLs be included in that 
 documentation? 

 Appreciate the help, thanks. 

 Keith 
 -- 
 Blog: http://goo.gl/iOwv1w 

 You can't live a perfect day without doing something for someone 
 who will never be able to repay you. 



-- 
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: Paypal Recurring Payments? Any experience? Any alternatives?

2014-03-31 Thread Christopher Steel
Freshbooks reoccurring invoices + Stripe AND/OR Paypal is hard to beat.

C.

On Monday, March 31, 2014 5:57:14 AM UTC-4, Mika Sjöman wrote:

 Hi

 I wonder if anyone here has implemented recurring payments with Paypal 
 here with Web2py? Any experience with this and how to implement it?

 We currently charge people for lessons with our teachers, but we would 
 like to go over to a payment model where we automatically charge the 
 customers every month. 

 Is there a better way of doing this than Paypal? Market is mostly US and 
 China based. 

 Cheers


-- 
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: New Merchant service -- WePay.com

2014-03-31 Thread Massimo Di Pierro
Nice. we should have integration with web2py.

On Monday, 31 March 2014 16:31:57 UTC-5, Joe Barnhart wrote:

 These guys look very much like Stripe.com as credit-card merchant service 
 providers -- that is to say, VERY good!

 Two differences stand out -- WePay can process electronic checks as well 
 as credit cards, an advantage not shared by Stripe.  Also, the WePay API is 
 based on OAuth2, which seems like an odd choice, but maybe only because I 
 know nothing about OAuth2.

 Look over their service and comment on how easy/hard it would be to 
 integrate with web2py.  I'm happy with Stripe.com, but if experience has 
 taught me anything its to always have an alternative!

 http://wepay.com



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


Re: [web2py] for the experts among us

2014-03-31 Thread Alvaro Mantilla Gimenez
+1


2014-03-31 11:06 GMT-06:00 Massimo Di Pierro massimo.dipie...@gmail.com:

 https://www.youtube.com/watch?v=BKorP55Aqvgapp=desktop

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


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


[web2py] Re: Web Editor Blank Screen

2014-03-31 Thread James Ryan
Thanks Derek.

Tried multiple browsers and machines, using incognito/no extensions etc 
with no luck. I haven't been able to successfully edit any files at all.

I couldn't see any errors in the apache log on the Raspberry Pi but I'll 
add that line to the config file and try again.

Cheers.

On Tuesday, April 1, 2014 5:44:54 AM UTC+11, Derek wrote:

 also, make sure you have this line in your apache config...

 Header always append X-Frame-Options SAMEORIGIN


 On Monday, March 31, 2014 11:25:23 AM UTC-7, Derek wrote:

 The 'canceled' message can be caused by a few different routes, either a 
 navigation away to a different page, a user clicking the 'stop' button, or 
 an ad blocker... you should look at your network data to get better 
 answers. 

 http://dev.chromium.org/for-testers/providing-network-details

 There are other situations that chrome will cancel requests, such as the 
 dom object which caused the request getting deleted, or another request 
 going to the same server had an error (it will stop the request to prevent 
 from getting another error).

 I'd hazard a guess and say it's likely a dom object getting deleted, but 
 you'll have to investigate further. If this happens a lot with your RPI it 
 could be an indication of the server returning an error (and chrome cancels 
 pending requests).


 On Friday, March 28, 2014 7:18:38 PM UTC-7, James Ryan wrote:

 Hi guys,

 Having an issue with the web editor. Other's have experienced this 
 problem before with no resolution:

 https://groups.google.com/forum/#!topic/web2py/fIuUAqdSieQ

 https://groups.google.com/forum/#!topic/web2py/SxYJX90zszY

 http://comments.gmane.org/gmane.comp.python.web2py/120843

 I'm running web2py on a raspberry pi on the local network. I can access 
 it fine, log into the admin interface, create a new app, and peek at the 
 files. When I go to edit any files the page loads but the file doesn't. 
 I've tried on multiple machines and browsers. The raspberry pi is headless 
 and doesn't have xserver so I can't try locally.

 Using Chrome's debugger I can see the http request being cancelled and 
 there's no response data in the header

 http://imgur.com/5HUd3cp

 http://imgur.com/wBPwRRl

 Looking at /var/log/apache2/access.log the http request returns 200 OK

 Any thoughts what this might be?






-- 
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: Paypal Recurring Payments? Any experience? Any alternatives?

2014-03-31 Thread Massimo Di Pierro
No credit card payment processor is free. They all charge more or less 3%.

On Monday, 31 March 2014 16:13:51 UTC-5, Matheus Cardoso wrote:

 For sure, using Stripe is way more easier than I ever seen or used. 
 However, it seems that it is a paid service. So you can do with Requests, 
 for instance, and for free (at least the development part). I did something 
 like 
 thathttps://github.com/matheuscas/hackathon_paypal/blob/master/controllers/paypal.pyin
  PayPal Hackathon in Campus Party Brasil 2014 in São Paulo, Brazil. The 
 code is not good, cuz the invoices are fixed on the code and some parts are 
 in portuguese. But, you can focus on something like this:


 def create_recurring_payments_profile():

  basic_data = basic_request
  recurring_payments_data = {
  'METHOD':'CreateRecurringPaymentsProfile',
  'TOKEN':request.vars['TOKEN'],
  'PAYERID':request.vars['PAYERID'],
  'PROFILESTARTDATE': request.now,
  'DESC': 'Revista Info',
  'BILLINGPERIOD': 'Day',
  'BILLINGFREQUENCY': '1',
  'AMT': 100,
  'CURRENCYCODE': 'BRL',
  'COUNTRYCODE': 'BR',
  'MAXFAILEDPAYMENTS': 3
  }


  basic_data.update(recurring_payments_data)
  r = requests.get(sandbox, params=basic_data)
  return dict(details=__response_details_to_dict(r.text))


 Worked like a charm. ;)

 On Monday, March 31, 2014 6:57:14 AM UTC-3, Mika Sjöman wrote:

 Hi

 I wonder if anyone here has implemented recurring payments with Paypal 
 here with Web2py? Any experience with this and how to implement it?

 We currently charge people for lessons with our teachers, but we would 
 like to go over to a payment model where we automatically charge the 
 customers every month. 

 Is there a better way of doing this than Paypal? Market is mostly US and 
 China based. 

 Cheers



-- 
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: Remove query db field

2014-03-31 Thread xgp . latino
Hi all.

Right now i have made this:

In controller i select rows:

detalleusuario = 
db(db.hcpacientes.noid==form.vars.noid).select('hcpacientes.tid', 
'hcpacientes.noid', 'hcpacientes.nombre').first()

Then in views, i display same variable with identifier fields:

{{=detalleusuario.tid}}
{{=detalleusuario.noid}}
{{=detalleusuario.nombre}}

Sometimes it worked, sometimes not. I wonder if is it wrong doing this.


Regards.


El martes, 25 de marzo de 2014 23:30:01 UTC-5, xgp.l...@gmail.com escribió:

 Hi all.

 As mostly may know, when doing a select query the result will show a db 
 field title for each column.

 How do i remove or change this db field title for some nice header as use 
 with smartgrid.?



 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.