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
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
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
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
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
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
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
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
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
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
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
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
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.
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(...),
>
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
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
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
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
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
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'):
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"
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
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()
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
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
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.
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
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.
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
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
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
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
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
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
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].
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
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
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
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
39 matches
Mail list logo