[web2py] Re: batch upload of legacy files

2010-02-19 Thread ls1
Hi, Short answer is: use web2py :-) I've had similar issue some time ago with collection of pictures. I defined function (say 'movePictures') which iterate through all pictures in source directory (other then 'uploads') and used web2py DAL to insert them into database (and uploads directory) and

[web2py] Re: Saving Thumbnail Files

2010-02-22 Thread ls1
Hi, I've had the same issue before and did it that way: Since your object is to upload a file and make a thumbnail at the same time, then: 1. Hide thumbnail field in a form. User will add image only and web2py do the rest. In your controller: fields=['Name','MainPic'] form=SQLFORM(db.yourtable,

[web2py] Re: Saving Thumbnail Files

2010-02-22 Thread ls1
small typo error in my previous post: should be: > def makeThumbnail(ImageID): >     try:    thisImage=db(db.yourtable.id==ImageID).select()[0] >     except: return >     im=Image.open(request.folder + 'uploads/' + thisImage.MainPic) >     im.thumbnail((200,150),Image.ANTIALIAS) >     thumbName='I

[web2py] Re: [Interview] Where do you use web2py?

2010-03-17 Thread ls1
- moulds and - machinery management in manufacturing plant On 17 Mar, 07:53, Joe Barnhart wrote: > I'm using web2py to create applications for competitive swimming.  I have an > online meet entry website now for high school swim events and plan to add a > website that will actually run the meet p

[web2py] Re: Drop boxes in 1.76.5

2010-03-22 Thread ls1
For me it doesn't really matter what is default behaviour, as long as it is documented. Since I use zero='None' mostly, so change will not affect me much. But I would to ask to document it in official web2py book anyway. Please don't take for granted that all users frequently go for epydocs to stu

[web2py] Translations stopped working in 1.74.8

2010-01-28 Thread ls1
Hello, I recently upgraded web2py from 1.62.2 to 1.74.8 and have following problem. The applications (even 'welcome' which comes with web2py) are not translated according to web browser language preferences. If I have set language preferences in web browser like: 'pl','en' -> I got all messages

[web2py] Re: Translations stopped working in 1.74.8

2010-01-29 Thread ls1
we had a long discussions about > this here). This means if your app is not in english but you do not > explicitly declare the language, web2py thinks it is english and will > not translate it. > > Massimo > > On Jan 28, 4:14 am, ls1 wrote: > > > Hello, > > &

[web2py:18205] Nested queries

2009-03-17 Thread ls1
Let's consider following tables: db.define_table('users', SQLField('name')) id1=db.users.insert(name='user A') id2=db.users.insert(name='user B') db.define_table('jobs', SQLField('description'), SQLField('user1',db.users), SQLF

[web2py:18208] Re: Nested queries

2009-03-17 Thread ls1
7 Mar, 16:05, mdipierro wrote: > This should do it: > > u1=users.with_alias('u1') > u2=users.with_alias('u2') > db().select(db.jobs.description,u1.name,u2.name, >   left=(u1.on(db.jobs.user1==u1.id),u2.on(db.jobs.user2==u2.id))) > > On Mar 17, 9:48 am, ls1

[web2py:20159] Re: SQLFORM - inserting value for a field that isn't shown?

2009-04-21 Thread ls1
In your controller: fields=[...] form=SQLFORM(...,fields=fields) form.vars.hiddenField = value On 21 Kwi, 11:37, "web2py <<>> technicalbloke.com" wrote: > Hi All, > > I have table with a field that I don't want to show to the user > however, I do want to set it to a value I receive in a (well

[web2py] Re: Tr.lời: Re: Tr.lời: Re: Tr.lời: Re: web2py 1.95.1 and open issues

2011-05-16 Thread ls1
I confirm the problem. Had the same errors. Solution for user: delete all non-tickets files from errors directory. Any non-ticket file in directory generates error and links like http://127.0.0.1:8000/admin/default/errors/ does not work. To preserve directory structure in my application hg repos