Re: [web2py] Re: 5th Manual typo p.83

2013-03-17 Thread Martin Weissenboeck
I have found some typos too. Massimo,. what is the best way to tell you about these typos? Regards, Martin 2013/3/17 Massimo Di Pierro > Better a false positive than an unreported error. ;-) > > > On Sunday, 17 March 2013 16:59:50 UTC-5, jarrodwilcox wrote: >> >> >> On Saturday, March 16, 2013

[web2py] Re: web2py and timezones

2013-03-17 Thread Ron McOuat
Hi Massimo, I had to deal with this in an application I have been working on but it does not run on web2py, it is a service process under the web interface part of the application which is web2py based. There is a slight problem with making it a session variable which is a form of caching becau

Re: [web2py] Bunch/Batch/Bulk insert Re-use db.define_table field definition in SQLFORM.factory() ?

2013-03-17 Thread Anthony
When you enter a number in the "row" input, it sends an Ajax request to the test() function, which then loads an empty form in the "target" div. If you then submit that form, it will post back to the parent page function (i.e., index), and it won't send the value of "row" again. Anthony On Sun

[web2py] web2py and timezones

2013-03-17 Thread Massimo Di Pierro
I was looking at code to detect the user timezone and store dates consistently in UTC format. I made some changes in trunk to handle this. I could use some help testing. 1) In the header of your layout.html add: {{if not session.timezone:}} jQuery(function(){jQuery.post('{{=URL('default

[web2py] Finding reasons for errors

2013-03-17 Thread BlueShadow
Hi, my site gave me 3 new errors all are caused by bots (2 by alexa and one by googlebot). When I visit the path I get an error but my problem is that no one should visit this path. One is for displaying an image where there is no link (because this image doesn't exist anymore. The second error

Re: [web2py] Bunch/Batch/Bulk insert Re-use db.define_table field definition in SQLFORM.factory() ?

2013-03-17 Thread Anthony
No, db.commit() should not be necessary as long as the inserts are part of a request (committing happens automatically at the end of the request). Anthony On Sunday, March 17, 2013 3:37:01 PM UTC-4, Richard wrote: > > You may need to db.commit() because the manual insert may not commit > normal

Re: [web2py] Bunch/Batch/Bulk insert Re-use db.define_table field definition in SQLFORM.factory() ?

2013-03-17 Thread Anthony
Is that the entire view? You haven't included the form anywhere, so there are no company_0, company_1, etc. inputs. Anthony On Sunday, March 17, 2013 9:48:32 AM UTC-4, 黄祥 wrote: > > @anthony : thank you for correcting me anthony > @richard : i'm learning to use 2 input form too but not work as e

[web2py] Re: Create a pdf and attach it to a mail

2013-03-17 Thread Alan Etkin
> I'm not sure what you mean in the second option I meant that you could: "... even leave the filelike object which receives the fpdf output open and use that instead as attachment input without the need to write to the filesystem ..." > when you say filelike object what are you referring to?

[web2py] Re: 5th Manual typo p.83

2013-03-17 Thread Massimo Di Pierro
Better a false positive than an unreported error. ;-) On Sunday, 17 March 2013 16:59:50 UTC-5, jarrodwilcox wrote: > > > On Saturday, March 16, 2013 4:28:59 PM UTC-4, Jarrod Wilcox wrote: >> >> Page 83, view example should say session.counter rather than counter. >> >> >> > Please Disregard.

[web2py] Re: 5th Manual typo p.83

2013-03-17 Thread jarrodwilcox
On Saturday, March 16, 2013 4:28:59 PM UTC-4, Jarrod Wilcox wrote: > > Page 83, view example should say session.counter rather than counter. > > > Please Disregard. My error. Jarrod -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. T

Re: [web2py] Re: big file upload hangs web2py until kernel kills the process

2013-03-17 Thread Vincenzo Ampolo
On 03/15/2013 07:38 PM, Massimo Di Pierro wrote: If you have a a generic view of a {{=response.toolbar()}} than the view will be embedding everything in the form, including the form.vars, into the html. Otherwise this should not be a problem. Yeah. I was using a generic view. Thanks ;) -- Vi

Re: [web2py] Bunch/Batch/Bulk insert Re-use db.define_table field definition in SQLFORM.factory() ?

2013-03-17 Thread Richard Vézina
You may need to db.commit() because the manual insert may not commit normally maybe?? if form.process().accepted: for i in range(0, int(request.vars.row)): db.company.insert(company=form.vars['company_%s' % i]) db.commit() But I am not sure I understand you onkeyup

[web2py] Re: db.import_from_csv_file() fails with GAE

2013-03-17 Thread Massimo Di Pierro
I cannot read the ticket. Too pixelated. Can you cut and paste the ticket in the message? On Saturday, 16 March 2013 11:11:06 UTC-5, David Manns wrote: > > Now that GAE is deprecating Python 2.5 I have been testing with Python 2.7 > and latest Web2py. In the course of this I encountered a proble

[web2py] Re: Sqlite for production

2013-03-17 Thread Massimo Di Pierro
I use sqlite in production. It is faster than other options. If do not have too many requests it is a good solution. It you start to have many write requests which overlap to each other concurrently, then you must switch because sqlite will lock the db at every write. On Friday, 15 March 2013

[web2py] Sqlite for production

2013-03-17 Thread Ralph Loizzo
I'm using sqlite for development of some websites (mostly migrating from php to web2py) but I'm wondering if when I deploy I should switch to mysql. Can sqlite handle the load? -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscrib

[web2py] Re: Field('upload') : problem with file name

2013-03-17 Thread Loïc
Thank you Niphlod, I'll try this... Le samedi 16 mars 2013 18:04:28 UTC+1, Niphlod a écrit : > > I was wrong. the first part of the "hash" is a uuid, the second is a > base16 encoding of the original filename. > > Seems that you need some logic to cut down long files if you plan to host > on Win

Re: [web2py] Bunch/Batch/Bulk insert Re-use db.define_table field definition in SQLFORM.factory() ?

2013-03-17 Thread 黄祥
@anthony : thank you for correcting me anthony @richard : i'm learning to use 2 input form too but not work as expected (no error occured), the data is not insert after i submit it. any idea about this? thank you *default.py* def test(): inputs = [] for i in range(0, int(request.vars.row

[web2py] Re: Create a pdf and attach it to a mail

2013-03-17 Thread jjg0
I'm not sure what you mean in the second option, when you say filelike object what are you referring to? I tried: ... ... attachments = mail.Attachment(pdf, filename='sample.pdf')) where pdf=MyFPDF() from the original example, but that doesn't work. I'm sure this isn't a new issue, but I hav

[web2py] How to process long time task?

2013-03-17 Thread RunSky ruan
I have a question. that in the request A i must start a long time task to process a task And i must sync the The progress of the task to the client. How to should i do . if I use the session,the session can't save before return .but he long time task can't return Immediately! Help me --

[web2py] list:reference

2013-03-17 Thread Annet
In my application I defined the following tables: db.define_table('module', Field('name',length=32,default='',requires=[IS_LENGTH(32,error_message='lengte overschreidt 32 tekens'),IS_NOT_EMPTY(),IS_NOT_IN_DB(db,'module.name',error_message='module al in database')],notnull=True,unique=True)

[web2py] Re: automatically populate child field with parent field

2013-03-17 Thread Alex Glaros
oops, forgot to add "writable=False,readable=False" attributes to sharedServiceID in model. That helped. Now the sharedServiceID does not display to the user. But it still gets filled with "none" instead of the parent's ID Alex On Sunday, March 17, 2013 12:13:58 AM UTC-7, Alex Glaros wrote: >

[web2py] automatically populate child field with parent field

2013-03-17 Thread Alex Glaros
I'm trying to automatically populate child FK field "sharedServiceID" using the controller below, but the field is displayed as unpopulated to the user. I'd like the field to be either displayed to the user as populated with "sharedServiceID" from the parent table,or not appear to the user at