[web2py] Hide flash message after some elapsed time instead of on click

2016-07-10 Thread Jim Brouzoulis
Hi everyone, Can I easily customise the web2py.js file to automatically hide/fade out the flash message after some given time (like a few seconds) instead of clicking on it? If so, how? I have a feeling that the solution is probably not that complicated but my js-skills aren't very impressive

[web2py] Re: Anyone ever done a braintree integration with web2py?

2016-07-10 Thread Jeff Lipkowitz
No, but I wonder how you would do an integration for payment. On Friday, 30 May 2014 03:19:20 UTC-5, Mark Graves wrote: > > Hey everyone, > > Using braintree to process payments in an app I'm working on. Anyone ever > done it and willing to answer a few questions? > > (I checked their documenta

[web2py] web2py to generate html/xml/any file from template

2016-07-10 Thread RS
Hi Guys, My first question here so be gentle. Consider the use case. "I want to be able to generate a bunch of html/xml/text files using web2py templates/views and put them somewhere on the file system (may be even zip up the files). I am new to web2py and have seen a lot of information on how

[web2py] Re: How to use Let's Encrypt with Web2Py on Apache

2016-07-10 Thread Alexei Vinidiktov
How did you do it? On Monday, March 7, 2016 at 2:23:18 AM UTC+7, Jacinto Parga wrote: > > It's ok. I have already solved it with routes.py and the error handler. > > Thanks anyway > > El sábado, 5 de marzo de 2016, 0:30:35 (UTC+1), Jacinto Parga escribió: >> >> How can routes.py be configured to

[web2py] update_or_insert and composite key

2016-07-10 Thread Ívar Ragnarsson
Hi I'm new to Web2py and having some trouble with update_or_insert. Hope you guys can help me. The first time I run the update_or_insert function it correctly inserts the values into the table. (I'm using sqlite but also tried Postgresql). The next time I run it I get an Attribute: Traceback (mo

[web2py] How install pillow in web2by - Window xp

2016-07-10 Thread Carlos Henrique Sarro
Hi, I try to install PILLOW in web2by with windows xp, but I didn´t. What was suggested in emails posted here didn´t work in my case. My python is 2.7. Please help me. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web

[web2py] How active and 'professional' is web2py?

2016-07-10 Thread joeg816
I have been doing some research on Python web frameworks and have tried Django and Flask. They were OK... I found a free web2py video on Udemy and really liked the whole package, especially with the brilliant Admin. I want to take a deep dive and really learn this stuff. What scares me off i

[web2py] database updation error

2016-07-10 Thread parulsharmma
whenever we are updating values in a database, we encounter previous values instead of getting updated values.. why is it happing?? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issue

[web2py] Re: change dropdown menu login

2016-07-10 Thread quesada . ostos
El jueves, 12 de mayo de 2016, 15:39:30 (UTC+2), Alessio Varalta escribió: > > Hi, I want to change the dropdown menu in the rigth corner of the web2py > application. I don't want the text Login but a icon..I see that the code is > imported with > > > {{='auth' in globals() and

[web2py] How to display intermediate Data at html page, if function will run till 6-10 hours.

2016-07-10 Thread Chetan Jain
Hello Mates, Problem : I'm calling a function which runs executes every 30 minutes, now i want to display content one after other webPage, how can i do it? For example. def index(): redirects(URL('call_print")) return locals def call_print(): for i in range(1,10): print i time

[web2py] How to implement token based restful api in web2py

2016-07-10 Thread Rakesh Sinha
Hi All, I am very new to web2py. I need to create some token based REST APIs which will be consumed by other web application (Also written in web2py). How do we do that in web2py? I have used djanfo REST Framework, is there anything similar in web2py? Please help. Thaks in advance . -- Resource

[web2py] Re: web2py traceback is not clear to tell the error

2016-07-10 Thread Massimo Di Pierro
It is simply possible that line is created multiple times. Add a print request before the index() function to check. The second time it is called the index exists already. In SQLITE you can do CREATE INDEX IF NOT EXISTS On Friday, 8 July 2016 19:47:42 UTC-5, 黄祥 wrote: > > let say i have a

[web2py] Re: Uploading multiple images in web2py

2016-07-10 Thread Massimo Di Pierro
At this time there is not. On Friday, 8 July 2016 17:42:35 UTC-5, Fabio Ceccarani wrote: > > Thanks Ron. > Thanks Massimo, I have 6 upload fields (img01, img02,...img06); there is > way to use multiple upload with only one in a > SQLFORM? > > Thanks > Fabio > > Il giorno mercoledì 6 luglio 201

[web2py] Re: Support graph database pyDAL.

2016-07-10 Thread Massimo Di Pierro
No planning to at this time. They are too specific to be work the SQL like syntax of dal. Frankly I am more interested in building a graph data on top of dal can use a relational back-end as storage. I believe it to be possible. On Thursday, 7 July 2016 17:22:45 UTC-5, Marlysson Silva wrote: > >

[web2py] Re: new experimental feature in trunk - rows.join(...)

2016-07-10 Thread Massimo Di Pierro
yes. you can do that. On Thursday, 7 July 2016 05:31:30 UTC-5, Mirek Zvolský wrote: > > Massimo, this is great ! > > From your second example I think, it could work for serial m:1 joins too. > Example: > invoice_item >- product >- product_group > If I want list invoice_items with product.name + wi

[web2py] Re: save the original value of one field in another field

2016-07-10 Thread Anthony
Here's a potentially better option that will work even in appadmin and doesn't require an extra callback if you need to do an insert followed by an update in the same request: db.define_table('mytable', Field('modifiable_number', 'integer', requires=IS_NOT_EMPTY()), Field('original', 'in

[web2py] Re: save the original value of one field in another field

2016-07-10 Thread Anthony
On Sunday, July 10, 2016 at 4:38:33 PM UTC-4, ahz...@gmail.com wrote: > > In my application a user enters a boolean value, and later the user can > modify the value*.* I want to save the original value in another field, > and the user shouldn't be able to see or alter the original value. > > Base

[web2py] Re: save the original value of one field in another field

2016-07-10 Thread Anthony
On Sunday, July 10, 2016 at 10:09:55 PM UTC-4, Michael Beller wrote: > > For n2, you could try only updating if n2 was not empty. This is not > tested but something like ... > > Field('n2', 'integer', compute=lambda r: r.start_number if not r.n2 else > None) > That won't work because (a) the cu

[web2py] Re: save the original value of one field in another field

2016-07-10 Thread ahz001
Michael, I tried this new model where n3 is your suggestion and n4 is derived from your suggestion. db.define_table('mytable', Field('start_number', 'integer', requires=IS_NOT_EMPTY()), Field('n1', 'integer', default=request.post_vars.start_number), Field('n2', 'integer', compute=lam

[web2py] Re: Bootstrap datepicker plugin

2016-07-10 Thread Michael Beller
I'm using bootstrap-datepicker.js also with these changes, not sure it's as robust but works and I use it for multiple date formats such as this: Field('origination_date', 'date', widget=datepicker_widget(format='mm/', min_view_mode='months' ), requires=IS_DATE('%m/%Y')), # exa

[web2py] Re: save the original value of one field in another field

2016-07-10 Thread Michael Beller
For n2, you could try only updating if n2 was not empty. This is not tested but something like ... Field('n2', 'integer', compute=lambda r: r.start_number if not r.n2 else None) On Sunday, July 10, 2016 at 4:38:33 PM UTC-4, ahz...@gmail.com wrote: > > In my application a user enters a boolean

Re: [web2py] Re: Pythonanywhere Timezone

2016-07-10 Thread Jeff Riley
Great thank you Marlysson. I will try this as soon as I can. Hopefully tomorrow. Thank you, Jeff Riley > On Jul 10, 2016, at 4:39 PM, Marlysson Silva wrote: > > You try to make this: > > 1. Add library in the front-end to get user timezone ( this code need to be > in the first page that us

[web2py] Re: Pythonanywhere Timezone

2016-07-10 Thread Marlysson Silva
You try to make this: 1. Add library in the front-end to get user timezone ( this code need to be in the first page that user access ), to get timezone first. - https://bitbucket.org/pellepim/jstimezonedetect/src {{if timezone_is_unknown: }} $(function() { var tz_name = jstz.determine();

[web2py] save the original value of one field in another field

2016-07-10 Thread ahz001
In my application a user enters a boolean value, and later the user can modify the value*.* I want to save the original value in another field, and the user shouldn't be able to see or alter the original value. Based on the stackoverflow

[web2py] Re: how to limit query fields for grid

2016-07-10 Thread Alex Glaros
works perfectly now Anthony. Thanks! query = ((db.strategic_goal.transparency_level_fk == 1) & (db.strategic_goal.organization_fk == db.Organization.id)) [setattr(f, 'readable', False) for f in db.Organization if f.name not in ('Organization.organization_full_name')] grid = SQLFOR

[web2py] Re: onvalidation error for nonSQLFORM but request.vars

2016-07-10 Thread lucas
this is not the complete code: def main(): msg = CAT() frm = SQLFORM.factory(db.case, db.sheet, buttons=btn) if frm.process(onvalidation=chk_1step).accepted: cidi = db.case.insert(**db.case._filter_fields(frm.vars)) frm.vars.case_id = cidi sidi =db.sheet.insert(

Re: [web2py] orderby part of a string...

2016-07-10 Thread Richard Vézina
Something inside parenthesis, not sure if it specify the end of the string, in my case the parentheisis is at the end... :) Richard On Fri, Jul 8, 2016 at 5:56 PM, Dave S wrote: > > > On Friday, July 8, 2016 at 12:13:41 PM UTC-7, Richard wrote: >> >> Answer is yes it work just fine... >> >>

[web2py] Re: onvalidation error for nonSQLFORM but request.vars

2016-07-10 Thread Anthony
Please show some code. On Sunday, July 10, 2016 at 12:10:00 AM UTC-4, lucas wrote: > > hey everyone, > > under the onvalidation function, i can add errors for fields that are not > directly generated from an SQLFORM but from client side jQuery side. but > those fields are correctly still coming

[web2py] Re: how to limit query fields for grid

2016-07-10 Thread Anthony
Should be a list of field *names*, not Field objects (note, you are comparing with f.name). Anthony On Saturday, July 9, 2016 at 11:51:46 PM UTC-4, Alex Glaros wrote: > > am still not understanding a couple of the concepts > > the grid query is result of join so I assume I run one of these [set

[web2py] AppConfig compatibility with previous versions

2016-07-10 Thread Nico de Groot
Appconfig is a separate feature, an alternatieve to vars in a model file. There's no connection to the Auth module. Please explain and show code, error and traceback. Nico de Groot -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Sou