[web2py] Re: Validating Unique Database Entries Using GAE

2010-01-12 Thread Lennon
I solved my own problem. I has originally entered the name of the title as a "text" types instead of a "string" type. That was the problem. On Jan 13, 12:41 am, Lennon wrote: > Hello all, > > I'm attempting to check and see if an item title exists in the item's > database table before inputting

[web2py] Possible bug in Auth.retrieve_password()

2010-01-12 Thread Rowdy
I am using web2py 1.74.5. In Auth.retrieve_password() after form.accepts(...), there is a check that the email address corresponds to a valid user. Next there is a check of the user's registration_key value, however it reads: elif users[0].registration_key[:7] in ['pending', 'disabled']:

[web2py] Validating Unique Database Entries Using GAE

2010-01-12 Thread Lennon
Hello all, I'm attempting to check and see if an item title exists in the item's database table before inputting it. I've read that GAE won't accept the "IS_NOT_IN_DB" validation so I'm attempting to find a workaround. I tried unique = false but that didn't seem to change anything. Identical titl

[web2py] Re: Why double braces in view

2010-01-12 Thread Iceberg
I knew this, but I still avoid writing such long paragraph of code in view file. Because I am nervous that maybe someday some developer (other than me) modifies this my_view.html and unintentionally mess up all the indention, as we all know indention is not supposed to be important in a pure html f

[web2py] Re: choose a value

2010-01-12 Thread Iceberg
I also notice this change. I suggest to change its default value back to None, so that old apps behave in the same way. Or at least, let the default value be empty string '', rather than an English phrase "choose a value". The latter causes a developer have to customize it again and again when de

Re: [web2py] Re: Importing a file and can't get some characters...

2010-01-12 Thread Jason Brower
There is no error reported it simple shows different(multiple) charactors for ÖÄÅ in the view. I am using sqlight3. Best Regards, Jason On Tue, 2010-01-12 at 06:57 -0800, Brian M wrote: > Which database are you using? What's the error message you're > receiving? > > On Jan 12, 5:06 am, Jason Bro

[web2py] Re: Why double braces in view

2010-01-12 Thread Anand Vaidya
Wonderful. I missed that one! Regards Anand On Jan 13, 10:53 am, Thadeus Burgess wrote: > you can already do this > > {{for row in rows: > >     response.write(row.name, escape=True) > >     pass > > x = dict() > x['a'] = 'strA' > > response.write(x) > > }} > > -Thadeus > > On Tue, Jan 12, 2010

Re: [web2py] Re: Why double braces in view

2010-01-12 Thread Thadeus Burgess
you can already do this {{for row in rows: response.write(row.name, escape=True) pass x = dict() x['a'] = 'strA' response.write(x) }} -Thadeus On Tue, Jan 12, 2010 at 8:46 PM, Anand Vaidya wrote: > So, I have been thinking about this. > > Right now, a block of python code (say

[web2py] Re: Why double braces in view

2010-01-12 Thread Anand Vaidya
So, I have been thinking about this. Right now, a block of python code (say 10 lines) in a HTML file will have 4 ugly braces x10lines plus a pass embedded where needed. like: {{for row in rows:}} {{=row.name}} {{pass}} {{x=dict()}} {{x['a']='strA'}} {{x['b']='strB'}} and so on. What if we could

[web2py] Re: Anybody going to PyCon?

2010-01-12 Thread mdipierro
I know thay have Financial Assistantships but I guess they are mostly for students. They have different rates for hobbists and professionals. The main discount was for early registration but the deadline has passed. I am not going. I am just curious if anybody from our group will be there. Massim

[web2py] India trip

2010-01-12 Thread mdipierro
I will be in India the third week of February for a conference. Specifically I should be free on Wed Feb 25 and Thu Feb 26 evenings in Jaipur and Fri Feb 27 afternoon in Delhi. I would be happy to meet some web2py users. If you happen to be there and want to meet please email me personally. Massi

[web2py] Re: Importing a file and can't get some characters...

2010-01-12 Thread Brian M
Try adding .encode("utf-8") to whatever variable(s) seem to have the unicode characters in them, as in funky_variable.encode("utf-8") ~Brian On Jan 12, 5:06 am, Jason Brower wrote: > In importing my file I seem to not be able to import ÄäÖöÅå properly. > The file I am pulling from is UTF-8 accor

Re: [web2py] Anybody going to PyCon?

2010-01-12 Thread Kent Borg
mdipierro wrote: > Anybody going to PyCon? > Is there a special rate for unemployed folks? -kb -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, sen

[web2py] InvestP2P is hiring Web2Py developer to complete Social Lending Site

2010-01-12 Thread Web2py-SuperFan
Hi Gang, Superfan here - been a while since I checked in, been busy cranking out web2py code for a startup Social Lending Site for Small Businesses - InvestP2P.com It's about 75% done and we were able to raise a bit of Angel financing to complete it and so we are hiring someone to do the job. If

[web2py] Anybody going to PyCon?

2010-01-12 Thread mdipierro
Anybody going to PyCon? -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this

[web2py] Re: Does auth restrict download?

2010-01-12 Thread mdipierro
LOL. Look into gluon.globals.py both stream and download are methods of Response. They are more or less self contained. On Jan 12, 3:34 pm, weheh wrote: > A. Nirvana. Thank you. Thank you. And, thank you. I promise to > try to make you fat. You'll figure out what I mean. Anyway, now, wh

[web2py] Re: Does auth restrict download?

2010-01-12 Thread weheh
A. Nirvana. Thank you. Thank you. And, thank you. I promise to try to make you fat. You'll figure out what I mean. Anyway, now, where do I go to learn how response.download and response.stream really work? On Jan 12, 1:32 am, mdipierro wrote: > {{=IMG(src=URL(r=request,c='default',f='mydo

[web2py] Re: response.stream problem

2010-01-12 Thread LB22
Hi, it's ok, I realised that I could set response.headers['content- type'] = 'audio/mpeg'. That fixed my problem. Thank you for you help, as always. LB On Jan 12, 6:46 pm, mdipierro wrote: > What is the file format you are streaming? > It lookslike the Content-type is not set or incorrect. > >

[web2py] Re: response.stream problem

2010-01-12 Thread LB22
Hi Massimo, The file type is .mp3. Can I pass the contenttype to response.stream () ? On Jan 12, 6:46 pm, mdipierro wrote: > What is the file format you are streaming? > It lookslike the Content-type is not set or incorrect. > > Massimo > > On Jan 12, 12:10 pm, LB22 wrote: > > > Hi, > > > Last

[web2py] Re: response.stream problem

2010-01-12 Thread mdipierro
What is the file format you are streaming? It lookslike the Content-type is not set or incorrect. Massimo On Jan 12, 12:10 pm, LB22 wrote: > Hi, > > Last night I did an upgrade of web2py from 1.65.x to 1.74.5. Now, this > piece of code: > > return response.stream(open(path,'rb'),chuck_size=4096

[web2py] response.stream problem

2010-01-12 Thread LB22
Hi, Last night I did an upgrade of web2py from 1.65.x to 1.74.5. Now, this piece of code: return response.stream(open(path,'rb'),chuck_size=4096) ...does not work. It was working fine before the upgrade. I've looked at the changes between versions but I don't see what could have caused this. Too

[web2py] Re: plugin static files

2010-01-12 Thread mdipierro
I think this is now fixed in trunk. Can you try it? On Jan 12, 10:46 am, selecta wrote: > Ok here is what i did > I go tohttp://127.0.0.1:8000/admin/default/plugin/movie/starrating > I create a new static file called test (create file with filename: I > enter "test.txt") > test.txt does not appea

[web2py] Re: plugin static files

2010-01-12 Thread mdipierro
very good point. Fixing it now. On Jan 12, 10:46 am, selecta wrote: > Ok here is what i did > I go tohttp://127.0.0.1:8000/admin/default/plugin/movie/starrating > I create a new static file called test (create file with filename: I > enter "test.txt") > test.txt does not appear in the plugin > >

[web2py] Re: new in trunk RFC

2010-01-12 Thread mdipierro
oops On Jan 12, 10:18 am, DenesL wrote: > On Jan 12, 10:26 am, mdipierro wrote: > > > On Jan 12, 12:46 am, KMax wrote: > > > > few questions bellow: > > > On 10 янв, 21:38, mdipierro wrote:> There are > > > two new features in trunk. One will probably stay, the other > > > > I do not know: >

[web2py] web2py shell in emacs?

2010-01-12 Thread Johann Spies
Is there a way to tell emacs to use web2py's shell and environment for when in python mode? Regards Johann -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this gro

[web2py] Re: Error UnicodeDecodeError in sql.py

2010-01-12 Thread mdipierro
The problem is not so much with this code but with the fact that there seems to be non-unicode characters in one of your records. It comes up because of the fields in the SQLFORM as an IS_IN_DB validator. I have made a modification in trunk that will allow you hopefully to get the data out of the

[web2py] Re: plugin static files

2010-01-12 Thread selecta
i just deleted the test file I created and got an internal error Traceback (most recent call last): File "/home/fkrause/Dev/web2py/gluon/restricted.py", line 173, in restricted exec ccode in environment File "/home/fkrause/Dev/web2py/applications/admin/controllers/ default.py", line 1005,

[web2py] Re: choose a value

2010-01-12 Thread mdipierro
IS_IN_DB(...,zero=None) On Jan 12, 9:51 am, Jose wrote: > How to remove the words "choose a value" of the dropbox? > I want to work as before where it showed the first reading in the > table. > > Jose -- You received this message because you are subscribed to the Google Groups "web2py-users" gr

[web2py] Re: plugin static files

2010-01-12 Thread selecta
Ok here is what i did I go to http://127.0.0.1:8000/admin/default/plugin/movie/starrating I create a new static file called test (create file with filename: I enter "test.txt") test.txt does not appear in the plugin But i tried again in a different way, and this worked I go to http://127.0.0.1:80

Re: [web2py] Re: New auth plugin

2010-01-12 Thread Thadeus Burgess
Could you share your findings? -Thadeus On Tue, Jan 12, 2010 at 10:12 AM, Miles Davis wrote: > > > On Jan 11, 3:27 pm, Miles Davis wrote: >> On Jan 11, 3:22 pm, mdipierro wrote: >> >> > The one you probably want to change is >> >> > gluon/contrib/login_methods/basic_auth.py >> >> That's wha

[web2py] Re: new in trunk RFC

2010-01-12 Thread DenesL
On Jan 12, 10:26 am, mdipierro wrote: > On Jan 12, 12:46 am, KMax wrote: > > > few questions bellow: > > On 10 янв, 21:38, mdipierro wrote:> There are two > > new features in trunk. One will probably stay, the other > > > I do not know: > > > > 1) Before you could do > > > > db.define_table

[web2py] Re: New auth plugin

2010-01-12 Thread Miles Davis
On Jan 11, 3:27 pm, Miles Davis wrote: > On Jan 11, 3:22 pm, mdipierro wrote: > > > The one you probably want to change is > > > gluon/contrib/login_methods/basic_auth.py > > That's what I thought at first, but that's actually performing > authentication via basic auth to a third party - what I

[web2py] Error UnicodeDecodeError in sql.py

2010-01-12 Thread Jose
The database server is MS-SQLServer The following was working (is a simplification): def test(): form = SQLFORM(db.DomiciliosSolicitud) return dict(form=form) in any of the updates stopped working. I do not know how long, because that portion is used infrequently. Now we are migrating th

[web2py] choose a value

2010-01-12 Thread Jose
How to remove the words "choose a value" of the dropbox? I want to work as before where it showed the first reading in the table. Jose -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com.

[web2py] Re: questions about regex_url

2010-01-12 Thread mdipierro
This is a big can of worms. Web2py restrict allowed chars in the url because they may be used to build file paths and we want to avoid problems with incompatible filesystems. Which chars should be allowed, which ones no? So far we took a conservative approach. Allowing any char: ((.+)) can result

[web2py] Re: plugin static files

2010-01-12 Thread mdipierro
seems to work for me. Perhaps I do not understand the question. Could you provide a more detailed explanation of the problem? Static files of plugins are not intended to appear under http://127.0.0.1:8000/admin/default/design/ but under http://127.0.0.1:8000/admin/default/plugin//rating On Jan

[web2py] Re: error

2010-01-12 Thread mdipierro
cannot say without looking at models and controller On Jan 12, 6:59 am, Alexandre Andrade wrote: > I get a crypt error on version 1.7.5 > > Traceback (most recent call last): >   File "gluon/restricted.py", line 173, in restricted >     exec ccode in environment >   File "/home/web2py/application

[web2py] Re: orderby upper issue

2010-01-12 Thread mdipierro
GAE does not support upper, lower, and any manpulation of the fields in queries. On Jan 12, 4:50 am, mattynoce wrote: > i have an issue with upper and gae (separate from other orderby=upper > questions i've seen) i was hoping you could comment on. > > i have this line: > select(...orderby=(db.tab

[web2py] Re: new in trunk RFC

2010-01-12 Thread mdipierro
On Jan 12, 12:46 am, KMax wrote: > few questions bellow: > On 10 янв, 21:38, mdipierro wrote:> There are two > new features in trunk. One will probably stay, the other > > I do not know: > > > 1) Before you could do > > >     db.define_table('person',Field('name'),format='%(name)s') > >     db

[web2py] Re: Caution: When same name params exist in both get_vars and post_vars

2010-01-12 Thread Iceberg
Ahhh, I am s regret that, I once noticed that post title "Python 2.6 Errata" but thought "who cares, I don't use Python2.6 at all", and did not open and read its body. That causes my hours today. ~~>o<~~ Thank you for the info, Tim. Now I have a better understanding. On Jan12, 10:55pm, Timot

[web2py] Re: Importing a file and can't get some characters...

2010-01-12 Thread Brian M
Which database are you using? What's the error message you're receiving? On Jan 12, 5:06 am, Jason Brower wrote: > In importing my file I seem to not be able to import ÄäÖöÅå properly. > The file I am pulling from is UTF-8 according to my text editor.  Could > I be doing something wrong with the

Re: [web2py] Caution: When same name params exist in both get_vars and post_vars

2010-01-12 Thread Timothy Farrell
You can read about the bug and patch here: http://groups.google.com/group/web2py/browse_thread/thread/6d9e0e6eb7d0aa3/99817324626f6d0f?lnk=gst&q=errata -tim On 1/12/2010 8:52 AM, Iceberg wrote: Hi pals, When upgrading from web2py 1.73.1 (last svn version) to 1.74.5, I encountered a malfunctio

[web2py] Caution: When same name params exist in both get_vars and post_vars

2010-01-12 Thread Iceberg
Hi pals, When upgrading from web2py 1.73.1 (last svn version) to 1.74.5, I encountered a malfunction of my old app. After some debug, I found out that it is because web2py changes its behaviour when same name params exist in both get_vars and post_vars. I don't know whether web2py 1.73 or 1.74 com

[web2py] Re: plugin static files

2010-01-12 Thread selecta
*bump* On Jan 11, 3:07 pm, selecta wrote: > when i create a static file in a plugin it just disappears, i can find > it again if i go into the main application > > the behavior I would expect is that a folder with the plugin name is > created e.g. static/plugin_test/ where all static files of the

[web2py] Re: Importing a large file

2010-01-12 Thread Brian M
Jason, glad you've got things working! :) No, you don't want to try showing that many records on screen all at once. Well at least not if you're letting web2py format it automatically, in experimenting with my own good sized datasets I've found that if you code out the table yourself in a view it

[web2py] error

2010-01-12 Thread Alexandre Andrade
I get a crypt error on version 1.7.5 Traceback (most recent call last): File "gluon/restricted.py", line 173, in restricted exec ccode in environment File "/home/web2py/applications/convenios/controllers/convenios.py"

[web2py] Re: Strange behaviour when appending on lists

2010-01-12 Thread Benigno
Thank you guys. On Jan 11, 9:25 pm, Thadeus Burgess wrote: > It is because pv is a pointer to the memory that holds its list. > > When you append pv to val, your appending the *reference* to pv. > > So whenever you update pv, all references to pv also reflect these changes. > > The reason that sl

[web2py] Importing a file and can't get some characters...

2010-01-12 Thread Jason Brower
In importing my file I seem to not be able to import ÄäÖöÅå properly. The file I am pulling from is UTF-8 according to my text editor. Could I be doing something wrong with the import? Best Regards, Jason Brower -- You received this message because you are subscribed to the Google Groups "web2p

[web2py] orderby upper issue

2010-01-12 Thread mattynoce
i have an issue with upper and gae (separate from other orderby=upper questions i've seen) i was hoping you could comment on. i have this line: select(...orderby=(db.table.field.upper()) and when the select returns an empty set, it looks fine on web2py. however, when the select returns an empty s

Re: [web2py] Re: Importing a large file

2010-01-12 Thread Jason Brower
Cool! That seemed to be importing properly. I have to be careful with displaying that much data in my browser. Actually filled my 2gb of ram! One more small thing to note here is that it doesn't account for old paint names in the database. So running the same file twice dupplicates, what seems t

[web2py] Bug in trunk: __getslice__

2010-01-12 Thread rfx_labs
gluon/sql.py", line 2716, in __getslice__ d = dict(field=str(self), pos=pos0+1, length=length) TypeError: cannot concatenate 'str' and 'int' objects Fix: d = dict(field=str(self), pos=str(int(pos0)+1), length=length) But this is ugly maybe a refactor of this methode is nessarry. Martin --

[web2py] Re: Upgrade problems

2010-01-12 Thread LB22
Sorry, I just realised I hadn't tried restarting apache. I did this and admin came back to life. I don't remember having to restart apache last time, but then it has been a while since I upgraded. Apologies for the unnecessary post. LB22 On Jan 12, 8:36 am, LB22 wrote: > Hi All, > > Last night I

[web2py] Upgrade problems

2010-01-12 Thread LB22
Hi All, Last night I decided to upgrade web2py from version 1.65 (not entirely sure which build) to 1.74.5. I used the old upgrade method of unzipping web2py over the old installation. I checked the manual before doing this (both my copy and the one on the web2py site), to make sure I was doing th