[web2py] Re: Should IS_TIME accept format?

2014-09-20 Thread Giacomo Dorigo
Undoubtedly it would be more coherent to have the possibility to set the time format as in IS_DATE and IS_DATETIME. On Friday, March 12, 2010 4:07:46 PM UTC+1, mdipierro wrote: > > good point. I will take the patch. > > On Mar 12, 9:01 am, DenesL wrote: > > To drop the seconds value as in the e

[web2py] How to use define_table format parameter beyond referenced records in select drop-downs?

2014-09-14 Thread Giacomo Dorigo
given a simple table db.define_table('person', Field('first_name'), Field('second_name'), format='%(first_name) %(second_name)' ) and a row object row = db.person(1) how can I print the row object formatted according to the

[web2py] Re: bootstrap 3 - if you care help test trunk now

2014-08-25 Thread Giacomo Dorigo
Hi Massimo, I was reading this page in the manual: http://web2py.com/books/default/chapter/29/12/components-and-plugins#Layout-plugins *What do you think about putting the (presently) default bootstrap 2 layout in a plugin?* In this way you will ship directly web2py with these: static/plugin_lay

[web2py] Re: How do I apply placeholder text to web2py forms?

2014-08-21 Thread Giacomo Dorigo
Method 1 can be easily generalized in a function that set the placeholder for all sqlform fields and strip away all labels and comments: def autoset_form_placeholders(form, form_labels=False, form_comments=False): for f in form.fields: if f == 'id': pass else:

Re: [web2py] Re: web2py shell vs terminal shell

2014-08-20 Thread Giacomo Dorigo
M, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > After truncate the table did you db.commit()? > > > On Sunday, 17 August 2014 23:17:29 UTC-5, Giacomo Dorigo wrote: >> >> I don't know, >> for some reason it does not leave me submit the ticket: >> >

[web2py] Re: Using cache for improving pagination recipe in the manual?

2014-08-20 Thread Giacomo Dorigo
In the end I solved with two simple classes, without using cache, but with two queries, one counting total items and one limited by limitby. Also I have looked in slices and I found some pagination plugins. Anyway here the basic code: class PageThread(object): def __init__(self, query, ite

Re: [web2py] Re: Using cache for improving pagination recipe in the manual?

2014-08-20 Thread Giacomo Dorigo
gt; cached_it = False #you logic to see if the cache needs to be updated > if not cached_it: > for i in range(number_of_pages): > rtn = db(query).select(limitby=(number_of_pages*no_of_records, > (number_of_pages+1)*no_of_records)) > cached_it = True > > but mind

Re: [web2py] Re: web2py shell vs terminal shell

2014-08-17 Thread Giacomo Dorigo
ts had been repeated again What is the expected output? only the new inserts should have been inserted On Sun, Aug 17, 2014 at 6:18 AM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > https://code.google.com/p/web2py/issues/entry > > > On Saturday, 16 August 2014 23:08:3

Re: [web2py] Re: web2py shell vs terminal shell

2014-08-16 Thread Giacomo Dorigo
OK, how do I open a ticket? On Wed, Aug 13, 2014 at 8:04 PM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > Please open a ticket about this. This is a major issue. Perhaps we should > remove the web based shell. > > > On Wednesday, 13 August 2014 02:41:17 UTC-5,

[web2py] Using cache for improving pagination recipe in the manual?

2014-08-16 Thread Giacomo Dorigo
I have read the manual recipe on pagination: http://web2py.com/books/default/chapter/29/14/other-recipes#Pagination That works fine if we just want to have a page aware if it has a previous or next one, but what if we want also to get the list of all next pages? i.e. by putting a link for each n

Re: [web2py] Re: web2py shell vs terminal shell

2014-08-13 Thread Giacomo Dorigo
Today I discovered an other problem with the admin shell. If I execute command 1 and then command 2, at this point it will re-execute command 1 too. If then I execute command 3, it will execute again also 1 and 2. This is while running web2py from source code on Windows with simple python web2py.

[web2py] Integration with Google Cloud Storage

2014-08-08 Thread Giacomo Dorigo
I have some difficulties in integrating web2py, Google App Engine and Google Cloud Storage. Integration with Amazon S3 is much much easier, in particular if using PyFilesystem http://docs.pyfilesystem.org/en/latest/introduction.html Is there any similar library for GCS? I tried to search for s

[web2py] Managing 600MB size files on Google Cloud with web2py

2014-07-23 Thread Giacomo Dorigo
Hello everybody, I am writing an app for storing and delivering files more or less from 3 up to 600Mb size. I would like to rely on Google App Engine for running my web2py instance. What I am wondering if it's better to store the data directly in the Google not relational datastore (Google Cloud

Re: [web2py] Re: Hiding submit button on Crud forms

2014-07-20 Thread Giacomo Dorigo
th > SQLFORM(..).process() > > On Saturday, 19 July 2014 03:30:31 UTC-5, Giacomo Dorigo wrote: >> >> I also did't find how to do that with CRUD, neither understood if there's >> a way to customize the submit button label. >> >> On Friday, July 1, 2011 3:1

[web2py] Re: Hiding submit button on Crud forms

2014-07-20 Thread Giacomo Dorigo
I also did't find how to do that with CRUD, neither understood if there's a way to customize the submit button label. On Friday, July 1, 2011 3:16:04 AM UTC+2, mr.freeze wrote: > > Hello! I've been away for a while but am diving back into web2py for a > new project. I want to host my Crud forms

[web2py] problems loading TODO element in editor

2014-07-09 Thread Giacomo Dorigo
Hello to everybody, I am running web2py on pythonanywhere platform and the TODO element at the bottom left corner of the code editor keeps loading forever. The pythonanywhere system recognize this and consider it a sign that my app has crushed and so it pushes it down and reload. The result of

[web2py] CAS not working

2014-07-03 Thread Giacomo Dorigo
Hello, I have a problem in using the web2py CAS service. I have created a cas_provider and a cas_client. I have accessed to cas_client /cas_client from here went to /cas_client/default/user/login?_next=/cas_client/default/index and been redirected to /cas_provider/default/user/cas/login?service=