[web2py] Best way to send a web2py patch

2011-07-03 Thread Luther Goh Lu Feng
Is there a recommended way to send a patch for web2py? I was looking for something like github's equivalent of pull request, but did not seem to find it. It will be great if this is documented on the web2py website, if not already done so. The following is just a fix to improve readability in the

[web2py] Re: ekjaa

2011-07-03 Thread Mohit
Thank you all for the kind words! Yes, it is a web2py website :) @Mikech: We are in the process of fixing the bugs and it should be resolved soon. We request you all to go through the website and let us know your feedback. It will help us greatly in further enhancing the website. You can contac

[web2py] Re: Best way to send a web2py patch

2011-07-03 Thread Massimo Di Pierro
I added your suggestion to trunk. This is the proper way to report an issue: http://code.google.com/p/web2py/issues/entry In most cases it is a good idea to first discuss it here. If no response or if you have a patch (like in this case), then open the issue. Thank you. massimo On Jul 3, 2:18 

[web2py] Re: Social network plug-in

2011-07-03 Thread Luther Goh Lu Feng
Looking through the source code, I deduce that db(db.connection.source==auth.user_id) (db.connection.target==request.args(1)).delete() is the same as db((db.connection.source==auth.user_id)) & (db.connection.target==request.args(1))).delete() Is this new syntax? I did not recall reading it in

[web2py] question about count()

2011-07-03 Thread weheh
To the best of my knowledge, count() doesn't take an argument, such as left. I would like to be proven wrong. If so, then how do we count if there's a left join, except by doing a select and then a len(db(query).select(...left=[...]))? Seems like it should be able to do db(query).count(left=[...]).

[web2py] autocomplete widget does not work on GAE

2011-07-03 Thread José L .
I've checked autocomplete widget can not work in gae, as it uses like in its callback. Checking this group archives, I've found this thread: https://groups.google.com/d/topic/web2py/HdnWTp7h3Do/discussion but even if it looks like it would work, finally it was not implemented. So, does anybody k

Re: [web2py] autocomplete widget does not work on GAE

2011-07-03 Thread Bruno Rocha
I dont know about autocomplete widget, but, for 'like' in GAE you can use Row.find() term = "something" pages = db(db.table.id>0).select().find(lambda row : row.field.startswith(term) or row.field.endswith(term) or row.field == term or term in row.field) On Sun, Jul 3, 2011 at 1

Re: [web2py] autocomplete widget does not work on GAE

2011-07-03 Thread José Luis Redrejo Rodríguez
startswith and endswith are not supported in GAE either 2011/7/3 Bruno Rocha : > I dont know about autocomplete widget, but, for 'like' in GAE you can use > Row.find() > >         term = "something" >         pages = db(db.table.id>0).select().find(lambda row : > row.field.startswith(term) or row.

Re: [web2py] question about count()

2011-07-03 Thread Bruno Rocha
the only argument you can pass to count() is a fieldname, so it will count using DISTINCT >>> db(db.products.id>0)._count('id') 'SELECT count(DISTINCT id) FROM products WHERE (products.id > 0)' Left Joins are Row objects, so this object is a fetched rows from database, there no way (that I know)

[web2py] Re: problem with gae deployment

2011-07-03 Thread RAMKRISHAN BHATT BACK IN ACTION in bangalore
actually i install 2.5 but still is not working after i install ubuntu 11.4 all problem is coming anyway thanks ..i'll try again. On Jun 1, 5:38 am, José Luis Redrejo Rodríguez wrote: > 2011/6/1 ramkrishan bhatt : > > > > > > > > > > > $ cd workspace/Running\ Project/ > > ramkrishan@ramkrishan-As

Re: [web2py] autocomplete widget does not work on GAE

2011-07-03 Thread Bruno Rocha
For me it is supported.. take a look, this is a plugin_wiki based "outdated" website http://web2pybrasil.appspot.com (the search box called 'Busca') The code behind: @staticmethod def searchPages(string=None,nfmessage='Nothing found with %s'): string = request.vars.search

[web2py] Re: question about count()

2011-07-03 Thread weheh
Thanks Bruno for the response. Yes, that's what I do -- I almost never use ALL unless I really need it. I'm into minimal overhead at ALL times. On Jul 3, 12:20 pm, Bruno Rocha wrote: > the only argument you can pass to count() is a fieldname, so it will count > using DISTINCT > > >>> db(db.produc

[web2py] Re: problem with gae deployment

2011-07-03 Thread RAMKRISHAN BHATT BACK IN ACTION in bangalore
in ubuntu 10.x is working but in ubuntu 11.4 its giving some error. ok i'll check it out once again. On Jun 1, 8:10 am, dhmorgan wrote: > check to see whether the command you indicated: > >     $ /home/ramkrishan/Downloads/Python-2.5.5/./python > > is running 2.6 or 2.5.5 > > not sure what the ef

[web2py] email and html

2011-07-03 Thread weheh
I'm sending email with html message body. Problem is, html doesn't seem to be working. I'm trying to inline an tag and an text link but neither of them is displaying properly in Thunderbird, my email client. On a 2nd note, I am also testing out the mail.send(..., message=('plain text message','ht

[web2py] Re: question about count() [closed]

2011-07-03 Thread weheh
On Jul 3, 12:20 pm, Bruno Rocha wrote: > the only argument you can pass to count() is a fieldname, so it will count > using DISTINCT > > >>> db(db.products.id>0)._count('id') > > 'SELECT count(DISTINCT id) FROM products WHERE (products.id > 0)' > > Left Joins are Row objects, so this object is a

[web2py] Re: email and html

2011-07-03 Thread pbreit
Can you look at the raw message to see if you can spot any problems?

[web2py] Error on Displaying Image from Custom URL

2011-07-03 Thread Lennon
Here is My Model db.define_table('img', timestamp, Field('caption','string', length=1000, requires=[IS_LENGTH(1000)]), Field('upload', 'upload', requires=[IS_LENGTH(20)], uploadfolder=os.path.join(request.folder, 'uploads','images','general')) ) To Display I've tried: B

[web2py] Re: Error on Displaying Image from Custom URL

2011-07-03 Thread Lennon
I accidently clicked "Send". More info to come soon. On Jul 3, 12:50 pm, Lennon wrote: > Here is My Model > > db.define_table('img', timestamp, >     Field('caption','string', length=1000, > requires=[IS_LENGTH(1000)]), >     Field('upload', 'upload', requires=[IS_LENGTH(20)], >           up

[web2py] Re: Error on Displaying Image from Custom URL

2011-07-03 Thread Lennon
In the DB the upload field looks like this which I think could be part of the problem: FieldStorage('upload', 'Mars.jpg', '\xff\xd8\xff\xe0\x00\x10JFIF \x00\x01\x01\x00\x00\x01\x00\x01\x00\x00\xff\xfe\x00>CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), default quality\n\xff\xdb\x00C \x00\x08\x06\x06\x

[web2py] Re: Error on Displaying Image from Custom URL

2011-07-03 Thread pbreit
I would suggest following the Book more closely: http://web2py.com/book/default/chapter/03 db.define_table('image', Field('caption'), Field('file', 'upload'))

[web2py] Re: email and html [closed]

2011-07-03 Thread weheh
Curious, got it working, now. Not sure what changed, exactly. Thanks @pbreit for the response.

[web2py] Decrypt Passwords.

2011-07-03 Thread David J.
I was wondering how I could decrypt the passwords in my DB? I want to change me auth.settings.hmac_key but if I do that then existing users wont be able to login so I thought if I could decrypt and then encrypt using the new key my problems would be solved. Thanks. David.

[web2py] Re: Decrypt Passwords.

2011-07-03 Thread pbreit
They are one-way hashed and thus not decryptable. What is typically done in this situation is 1) everyone has to re-generate a password (not ideal) or 2) begin using the new scheme and continue to accept old passwords for some period of time. I'm not exactly sure how #2 would be accomplished in

Re: [web2py] Re: Decrypt Passwords.

2011-07-03 Thread David J.
Thanks; Not exactly the answer I was looking for :) On 7/3/11 1:43 PM, pbreit wrote: They are one-way hashed and thus not decryptable. What is typically done in this situation is 1) everyone has to re-generate a password (not ideal) or 2) begin using the new scheme and continue to accept ol

[web2py] Re: Error on LOAD() in trunk

2011-07-03 Thread LightOfMooN
00 Preface "whilst always maintaining backward compatibility" Please, return previous ajax=False functionality (with passing current request to all LOAD(ajax=False) functions). It's a really important feature for component development. I have 2 sites broken because of it. =\ On 3 июл, 08:45, pbre

[web2py] Re: Error on LOAD() in trunk

2011-07-03 Thread pbreit
For now, you can revert back to changeset d4c2d8d15bb1 although I'm not sure if that will cause other problems.

[web2py] fcgihandler.py and pid file

2011-07-03 Thread Andrew Thompson
Greetings, I'm trying to use the web2py.ubuntu.sh script, but am having a little trouble. I use fcgihandler.py with lighttpd. I changed the DAEMON_ARGS line to say fcgihandler.py instead of web2py.py, and it will start the web2py instance successfully. But, it doen't seem to make a pid file,

[web2py] Re: Error on Displaying Image from Custom URL

2011-07-03 Thread Lennon
UPDATE: The error I was getting was caused by a missing ')' in the view so fixing that has gotten me to a new error. I simplified my model to how you have pbreit just to make things easier. But when I try to display the image like so: I get a 400 error in the Chrome Console: http://127.0.0.1

[web2py] Re: Error on LOAD() in trunk

2011-07-03 Thread LightOfMooN
say please how to do it, thx On 4 июл, 00:01, pbreit wrote: > For now, you can revert back to changeset d4c2d8d15bb1 although I'm not sure > if that will cause other problems.

[web2py] Re: Error on Displaying Image from Custom URL

2011-07-03 Thread Massimo Di Pierro
You managed to bypass the web2py upload mechanism and stored a FieldStorage object in the database. This is a mistake because it is difficult to take it out. The problem is probably not in your model but in the form you use to populate. Can you show us the action? On Jul 3, 2:29 pm, Lennon wrote

[web2py] Re: Error on LOAD() in trunk

2011-07-03 Thread Massimo Di Pierro
I do not have an objection to fix but I need to understand better what is broken. If the problem with the latest stable or with trunk too? On Jul 3, 12:59 pm, LightOfMooN wrote: > 00 Preface > "whilst always maintaining backward compatibility" > > Please, return previous ajax=False functionality

[web2py] Re: Error on Displaying Image from Custom URL

2011-07-03 Thread Lennon
Here is the form. I'm also using a custom uploader which is probably where the problem is: UPLOADER: def img_upload_widget(f,v, u): inp = SQLFORM.widgets.upload.widget(f,v, u) img_url = URL('default','download', args=v) img = IMG(_src=img_url, _style='max-width:350px;max-height:350px

[web2py] Re: Error on Displaying Image from Custom URL

2011-07-03 Thread Lennon
I'm doing it it through AJAX so it's broken up into add_form and add_item. Let me know if you need any clarification or additional code. add_form: def add_form(): is_admin() if not 't' in request.vars: return else: for k in ('t', 'pid', 'ptype'): globals()

[web2py] Re: Error on Displaying Image from Custom URL

2011-07-03 Thread Lennon
Disregard my last post. On Jul 3, 5:28 pm, Lennon wrote: > Here is the form.  I'm also using a custom uploader which is probably > where the problem is: > > UPLOADER: > > def img_upload_widget(f,v, u): >     inp = SQLFORM.widgets.upload.widget(f,v, u) >     img_url = URL('default','download', arg

[web2py] Re: Error on LOAD() in trunk

2011-07-03 Thread pbreit
For me, the problem seems to be this changeset: http://code.google.com/p/web2py/source/detail?r=143bbe9e11c1c66f6d932514c9918ad7410027b5 Light, if you are cloning Web2py with Mercurial (which is a good idea), you can specify exactly which version you want to be running like this: $ hg update [ch

[web2py] URGENT: help needed with Auth and Facebook data

2011-07-03 Thread Pystar
Hi all, I am trying to incorporate Facebook's registration plugin into a webapp I am developing but I am stuck at a point and need some clarifications on how Auth in web2py really works. First of all, I have been able to connect to facebook and retrieve signed data about users from it. I have also

[web2py] plupload and web2py

2011-07-03 Thread mr.freeze
I just spent the last hour tracking down a conflict between plupload and web2py. Long story short: plupload.flash.js tags a div with a secondary class 'flash' which web2py hides inadvertently in base.css, thereby disabling the flash functionality of plupload. Just wanted to document this in case it

[web2py] Re: plupload and web2py

2011-07-03 Thread Massimo Di Pierro
Notice that flash is only used in views/layout.html, views/ web2py_ajax.html and static/js/web2py_ajax.js You can replace class "flash" it with class "web2py-ajax" and it should fix the problem. On Jul 3, 9:04 pm, "mr.freeze" wrote: > I just spent the last hour tracking down a conflict between pl

[web2py] Re: URGENT: help needed with Auth and Facebook data

2011-07-03 Thread pbreit
I wouldn't mind seeing an overview of how to code a third party registration/login. I'm considering doing it for Facebook, Twitter, LinkedIn, Ebay and PayPal but can't make heads or tales of the information I've seen so far. I have no interest in using Janrain.

[web2py] Re: URGENT: help needed with Auth and Facebook data

2011-07-03 Thread Pystar
Massimo and I are working on it. More on this later. On Jul 4, 3:22 am, pbreit wrote: > I wouldn't mind seeing an overview of how to code a third party > registration/login. I'm considering doing it for Facebook, Twitter, > LinkedIn, Ebay and PayPal but can't make heads or tales of the informatio

[web2py] Re: crud.search query

2011-07-03 Thread niknok
Bump. Anyone? On Jul 1, 7:24 pm, niknok wrote: > I have field "gender" that is defined like so: > >         Field('gender','reference aux_gender',notnull=True,widget=radio_h) > > The aux_gender table data were inserted from: > >         db.aux_gender.insert(code='F',concept='Female') >         d

[web2py] Re: crud.search query

2011-07-03 Thread Massimo Di Pierro
I do not know. Try experiment some more or send me the app and I will take a look. On Jul 3, 10:02 pm, niknok wrote: > Bump. Anyone? > > On Jul 1, 7:24 pm, niknok wrote: > > > > > > > > > I have field "gender" that is defined like so: > > >         Field('gender','reference aux_gender',notnull=

[web2py] Re: regarding "http://mdp.cti.depaul.edu/"

2011-07-03 Thread Vineet
Oh ! I saw that link in old threads. Did not know that it is the predecessor of http://www.web2py.com Sorry for that. On Jul 2, 7:23 pm, Massimo Di Pierro wrote: > Where is that link? That was replaced byhttp://web2py.commore than 3 > years ago. > > On Jul 2, 7:56 am, Vineet wrote: > > > > > I

[web2py] Re: pyodbc access to Teradata (via web2py)

2011-07-03 Thread Andrew
Hi Massimo, Have you been able to look into creating a Teradata Adaptor ? Thanks and Regards Andrew

[web2py] Re: pyodbc access to Teradata (via web2py)

2011-07-03 Thread Massimo Di Pierro
I added but did not try. Get trunk and try something like: db=DAL('teradata://DRIVER{Teradata};DBCNAME=10.10.10.10; UID=test123;PWD=xxx;QUIETMODE=YES;') Look into dal.py TeradataAdapter.__init__ I assumed the SQL is DB2 compatible but I am sure there are exceptions. On Jul 3, 11:33 pm, Andrew

[web2py] patches on google code

2011-07-03 Thread Massimo Di Pierro
If you submitted a patch or new info in one of the old issues in google code, please remind me. I am not ignoring it, just find hard to keep track. Massimo

[web2py] talks

2011-07-03 Thread Massimo Di Pierro
I am giving two talks in California next week (July 7 at LBL) and the week after (July 13 at Python Users Group). Let me know if some of you will be there. I can send more details as they tell me. Massimo