[web2py:36157] Bug in Rows.exclude

2009-11-29 Thread Thadeus Burgess
Ok, I'm not sure why exclude is written completely different than find... but it returns the exact same results :) Given Rows = id name 1 hello 2 hello 3 hi 4 good morning list = Rows.find(lambda row: row.name == 'hello') YIELDS 1, 2 list = Rows.exclude(lambda row: row.name == 'hello') SHOULD YI

[web2py:36158] Re: Omit default controller for for any action

2009-11-29 Thread Alex
Looked there in the first place, then checked in bought manual. Didn't find any good way to do it. Dirty trick was to add rewrite rule in webserver. (*) -> /myapp/default/ and in routes.py out: /myapp/default/(?P.*) -> '/(?P.*)' Drawbacks: Now I can have only one controller. For each new contro

[web2py:36159] Off-Topic: Question about blog archive links

2009-11-29 Thread Thadeus Burgess
What is the benefit or reason for having date-sorted archive links on a blog? -Thadeus -- 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:36160] Re: send a tweet

2009-11-29 Thread murray3
see ammendments and it worked thanks urllib2 and request On Nov 28, 10:47 pm, murray3 wrote: > def twitter_post(username,password,message): >     import urllib, urllib2, base64, gluon.contrib.simplejson >     args= urllib.urlencode([('status',message)]) >     headers={} >     headers['Authorizati

[web2py:36161] RPX service from JanRain rpxAuth

2009-11-29 Thread murray3
Hi I am using notabenes rpxAuth module nd it allows me to login to my app via twitter and google no problems. The code automatically creates a profile database as well and in there are the values for my login provider and pic url etc, I am having problems exposing these values and need some help /f

[web2py:36162] Re: Plugin Central

2009-11-29 Thread selecta
nice design, i hope it will go online soon but i am having problems signing in, I registerd but after clicking the confimation link it jus says invalid login?? I would also suggest that you add a licencse category, for the tagging part also i would suggest that you use my improved version of the ta

[web2py:36163] Re: js functions from controller

2009-11-29 Thread mr.freeze
Something like this?: http://www.web2pyslices.com/main/slices/take_slice/8 On Nov 29, 1:46 am, haftish21 wrote: > Web2py view is successfully calling an online javascritpt library > under

[web2py:36164] File names

2009-11-29 Thread kbochert
While trying to use multiple models files, I tried to use a file named db-mymodel.py It was totally ignored by web2py until I changed the name to db_mymodel.py Is this something to do with windows/linux file naming? Karl -- You received this message because you are subscribed to the Google Grou

[web2py:36165] Re: multiple validations problem

2009-11-29 Thread mdipierro
Please state your problem again and check with latest trunk first. On Nov 29, 1:53 am, Thadeus Burgess wrote: > Actually, the problem is I am using an IS_NOT_IN_DB with an SQLFORM.factory. > Then I use update_record. > > -Thadeus > > On Sun, Nov 29, 2009 at 1:37 AM, Thadeus Burgess wrote: > > > I

[web2py:36166] Re: Bug in Rows.exclude

2009-11-29 Thread mdipierro
No no. Exclude is designed to remove the rows from the original rows object. It returns the exluded rows. Yes it does return the same as find but the way they act on the original rows are different. It does what it is designed to do. Yours does something else. On Nov 29, 2:55 am, Thadeus Burgess

[web2py:36167] Re: Omit default controller for for any action

2009-11-29 Thread mdipierro
If I understand you want that /f is mapped into /app/default/f for every f in default.py if there is no app called f and no controller called f. You have to explicitly list all cases of write a routes.py that builds routes_in diagrammatically. Else it is no obvous whether /f and f is an app, a c

[web2py:36168] Re: File names

2009-11-29 Thread mdipierro
It is a web2py convention: only [a-zA-Z0-9_] in url paths. Massimo On Nov 29, 8:49 am, kbochert wrote: > While trying to use multiple models files, I tried to use a file named > db-mymodel.py > It was totally ignored by web2py until I changed the name to > db_mymodel.py > > Is this something to

[web2py:36169] validator on update

2009-11-29 Thread annet
I have a table definition which reads like: db.define_table('bedrijf', Field(...), ... Field('created_on',type='datetime'), Field('modified_on',type='datetime'), migrate='bedrijf.table') db.bedrijf.created_on.default=request.now db.bedrijf.modified_on.default=request.now db.

[web2py:36170] Re: validator on update

2009-11-29 Thread mdipierro
If the modified_on field shown in the form? It should not be db.bedrijf.modified_on.readable=False db.bedrijf.modified_on.writable=False Does this fix the problem? On Nov 29, 9:11 am, annet wrote: > I have a table definition which reads like: > > db.define_table('bedrijf', >     Field(...), >  

[web2py:36171] request.args and error handling

2009-11-29 Thread vince
i've been doing lots of error handling with request.args. is that possible to have request.args[index] to return None instead of "index out of range" exception? -vince -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send

[web2py:36172] Re: request.args and error handling

2009-11-29 Thread mdipierro
request.args(index) On Nov 29, 10:05 am, vince wrote: > i've been doing lots of error handling with request.args. is that > possible to have request.args[index] to return None instead of "index > out of range" exception? > > -vince -- You received this message because you are subscribed to the

[web2py:36173] some stuff in trunk

2009-11-29 Thread mdipierro
I have added some stuff in trunk. 1) reference fields now have a default IS_IN_DB validator notull=True have a default IS_NOT_EMPTY validator unique=True have a default IS_NOT_IN_DB validator db.define_table('person',Field('name'), format='%(name)s') will give all references to to a person a

[web2py:36174] Re: js functions from controller

2009-11-29 Thread haftish21
How about importing the js library...??? -- 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 o

[web2py:36175] Re: js functions from controller

2009-11-29 Thread mdipierro
Mr Freeze has a more elegant solution. I just do def index(): response.files.append(URL(r=request,c='static',f='whatever.js')) script=SCRIPT('...js goes here...') return dict(script=script) On Nov 29, 1:46 am, haftish21 wrote: > Web2py view is successfully calling an online javascrit

Re: [web2py:36176] RSS encoding

2009-11-29 Thread Alexandre Andrade
thanks too. I had to use it. 2009/11/18 Alexey Nezhdanov > Hello. I noticed that generic.rss produces non utf-8 text. Even worse - it > produces iso-8859-1 text WITHOUT AN OPTION TO CHANGE THAT! > > So I made the following change to gluon/contrib/rss2.py : > > > def dumps(rss, encoding='utf-8'):

[web2py:36177] Re: web2py on Apache Tomcat

2009-11-29 Thread haftish21
I want to integrate an application that must run on apache tomcat with a web2py application. My interest was to avoid using two servers for the two applications, it seems now I've two use both servers. -- You received this message because you are subscribed to the Google Groups "web2py-users"

[web2py:36178] Re: web2py on Apache Tomcat

2009-11-29 Thread mdipierro
I do not know anythign about Tomcat but it seems to me you can make it work with Apache2 http://wiki.apache.org/tomcat/FAQ/Connectors You use mod_jserv to pass some requests to Tomcat and mod_wsgi to pass requests to web2py. You let Apache serve all the static content in both cases. Massimo On

[web2py:36179] How can I avoid this error in pagination?

2009-11-29 Thread drayco
This is my function @auth.requires_membership('Capturista') def lee_notas(): if len(request.args): page=int(request.args[0]) else: page=0 items_per_page=25 limitby=(page*items_per_page,(page+1)*items_per_page+1) Capturista = db(db.capturistas.creadoPor==auth.user.id).select()

[web2py:36180] Re: How can I avoid this error in pagination?

2009-11-29 Thread mdipierro
I do not think there is an error in your code. You have a lot of {{=table[nota.field].otherfield}} One of these may be failing if note.field references a record that no longer exist. Try instead {{=table[nota.field].otherfield if table[nota.field] else 'undefined'}} Anyway, this code does a lot

Re: [web2py:36181] Re: Plugin Central

2009-11-29 Thread Thadeus Burgess
Make sure you are using "username" not "emai" -Thadeus On Sun, Nov 29, 2009 at 7:32 AM, selecta wrote: > nice design, i hope it will go online soon > but i am having problems signing in, I registerd but after clicking > the confimation link it jus says invalid login?? > I would also suggest

Re: [web2py:36182] Re: Bug in Rows.exclude

2009-11-29 Thread Thadeus Burgess
I don't understand. Why would I want to return my excluded rows? Why does exclude work in place and find not? I would think they should work similar. When I want to exclude, I would think I want all the results returned with the lambda excluded. Just seems like thats what it should do, my bad.

[web2py:36183] Re: Bug in Rows.exclude

2009-11-29 Thread mdipierro
That is how the patch was designed by Mr.Freeze. Nobody opposed at the time. Now we keep is as is for backward compatibility. If you just need to return exluded rows, just used find and negate the condition. Nevertheless you do have a good point. Massimo On Nov 29, 1:59 pm, Thadeus Burgess wrot

Re: [web2py:36184] Re: multiple validations problem

2009-11-29 Thread Thadeus Burgess
I am using an IS_NOT_IN_DB validator with SQLFORM. The SQLFORM is also an interface to update and create (by setting the fields default values). When the form runs through form.accepts, since it is a factory IS_NOT_IN_DB fails on validation, since set_self_id is actually a dictionary (from SQLFORM.

Re: [web2py:36185] Re: Bug in Rows.exclude

2009-11-29 Thread Thadeus Burgess
Agreed I noticed using negated find would return what I expected, but it's not logical, and its another one of those things that I learned in school, never use negated logic unless absolutely necessary Basically that is all that the function I suggested does, is negate the lambda function, this wa

[web2py:36186] content-type email on gae

2009-11-29 Thread mattynoce
hi, i've been testing out my registration system on my mac and local google app engine, and the email registration has worked fine. when i make the smtp changes and push it up to gae, i still get the emails and they function properly but there's content-type gibberish everywhere. is there a way i c

[web2py:36187] Re: RPX service from JanRain rpxAuth

2009-11-29 Thread murray3
actually discovered the answer by scanning the code in rpxAuth.py - if any one else has the same problem. To expose fields in the users profile use: =auth.userprofile.provider =auth.userprofile.pic_url etc etc. cheers On Nov 29, 11:36 am, murray3 wrote: > Hi I am using notabenes rpxAuth module n

[web2py:36188] Re: content-type email on gae

2009-11-29 Thread mdipierro
Yes, this was a bug does to the fact that GAE does not support multipart emails. This is already fixed in http://web2py.com/examples/static/1.73.1/web2py_src.zip Massimo On Nov 29, 2:40 pm, mattynoce wrote: > hi, i've been testing out my registration system on my mac and local > google app engi

[web2py:36189] Re: send a tweet

2009-11-29 Thread murray3
I am using this function and it works great, now I want to use values from a form (textarea)for the username and password, this does not work and twitter returns a html 401 so I guess the values are not in correct format but I thought they would just be strings??? any help appreciated chrism On No

[web2py:36190] Re: gae and nosql

2009-11-29 Thread Richard
to support full text search you can generate all the N-grams of each record and then stored then in a StringListProperty: http://code.google.com/appengine/docs/python/datastore/typesandpropertyclasses.html#StringListProperty On Nov 28, 6:20 am, vince wrote: > i've notice the new DAL do support

[web2py:36191] Re: How can I avoid this error in pagination?

2009-11-29 Thread drayco
Thank's a lot for you advice. On 29 nov, 12:56, mdipierro wrote: > I do not think there is an error in your code. You have a lot of > > {{=table[nota.field].otherfield}} > > One of these may be failing if note.field references a record that no > longer exist. Try instead > > {{=table[nota.field].

[web2py:36192] Re: gae and nosql

2009-11-29 Thread mdipierro
You can but how well does it scale? to how many records? how long strings? On Nov 29, 5:23 pm, Richard wrote: > to support full text search you can generate all the N-grams of each > record and then stored then in a > StringListProperty:http://code.google.com/appengine/docs/python/datastore/type

Re: [web2py:36193] Re: gae and nosql

2009-11-29 Thread Thadeus Burgess
Actually, N-Grams scale very efficiently. I wrote a simple mp3 library manager, that uses N-grams on the ID3 tags of my mp3 collection, which is well over 60GB. Storing the N-gram of every song's ID3 only takes up roughly 1MB of RAM, if that. I would say for anything web2py would be used for, N-gra

[web2py:36194] Re: gae and nosql

2009-11-29 Thread mdipierro
Looking forward to the plugin. ;-) On Nov 29, 10:05 pm, Thadeus Burgess wrote: > Actually, N-Grams scale very efficiently. I wrote a simple mp3 library > manager, that uses N-grams on the ID3 tags of my mp3 collection, which is > well over 60GB. Storing the N-gram of every song's ID3 only takes u

[web2py:36195] crossdomain.xml problem

2009-11-29 Thread elffikk
Hi, I created routes in the root folder of web2py and it look like that routes_in = (('.*:/crossdomain.xml', '/myapp/static/ crossdomain.xml'),) I don't see any errors but http://127.0.0.1:8000/crossdomain.xml shows an 'Invalid request' message Any thoughts? -- You received this message becau