[web2py] how to show the edit button conditionally in the smartgird?

2016-10-16 Thread Tom2016
I need to list all the events that were registered by the members, but only the non-approved record is editable, the approved record only can view. how to do it? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://

[web2py] Re: how to show the edit button conditionally in the smartgird?

2016-10-16 Thread Massimo Di Pierro
SQLFORM.grid(, editable=...) editable can be True/False or a function that takes a row and returns True/False for each each row. On Sunday, 16 October 2016 10:42:12 UTC-5, Tom2016 wrote: > > I need to list all the events that were registered by the members, but > only the non-approved recor

[web2py] Force include langauge in URL path

2016-10-16 Thread Najtsirk
Hi, ia have in routes.py: routers = dict( # base router BASE=dict( default_application='app', ), app=dict(languages=['en', 'it'], default_language='en') ) So this works just fine. If I go to my app: http://localhost:8000/app I see English site and if I go to http://lo

[web2py] Re: web2py + cordova + APIs

2016-10-16 Thread Ron Chatterjee
Massimo, you really set the standard for others that I doubt anyone can meet! awesome. On Saturday, October 15, 2016 at 11:34:07 PM UTC-4, Massimo Di Pierro wrote: > > copy it from your welcome app. > > On Saturday, 15 October 2016 20:17:37 UTC-5, pbreit wrote: >> >> Interesting. >> >> I'm gett

[web2py] Re: How to cleanly pass FPDF output object to os Download/Save dialogue box

2016-10-16 Thread Peter
So this is better (thanks to Paul Rykiel's post re labels and responders including one Mariano Reingart)... and hope it helps someone else down the road. pdf = receipt_PDF() pdf.add_page()

[web2py] Re: How to cleanly pass FPDF output object to os Download/Save dialogue box

2016-10-16 Thread Peter
On Sunday, 16 October 2016 05:24:10 UTC+1, Peter wrote: > > > > I have this code that doesn't work too well... > > > import os > import sys > pdf = receipt_PDF() > pdf.add_page() > rcpt_filename = "RCPT_%s_%s.pdf" % (session.rcpt_number, > session.rcpt_recipient) > rcpt_filename = rcpt_filename.

Re: [web2py] vue.js

2016-10-16 Thread St. Pirsch
Fields a populated correctly but any queries in the scaffolding app return "Failed to load resource: the server responded with a status of 500 (INTERNAL SERVER ERROR)" Does the app need to be preconfigured in any way ? Am Dienstag, 11. Oktober 2016 16:59:11 UTC+2 schrieb Marlysson Silva: > > Unt

[web2py] Re: how to show the edit button conditionally in the smartgird?

2016-10-16 Thread 黄祥
pls try in your controller: has_membership_admin = auth.has_membership('Admin') if 'view' in request.args: editable = has_membership_admin else: editable = lambda row : (row['registration']['status'] != 'Approved') best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (