On Fri, Oct 30, 2009 at 1:12 AM, mdipierro wrote:
>
> Those book cost too much.
>
... and probably not generally so useful; Nam (I think) was a friend of
Reinke's/Baskin's (who wrote the paper on Role of Finiteness in Emergence of
Structure) Suh was (is?) head of Mechanical Eng. @ MIT; we
...you can review (and comment on) this in gluon/colmpileapp.py...
In general, this is an important step towards one kind of application
specific plugin (application activated, as compared to available at each
application request, or as part of gluon-level activation for availability
to any/all ap
Those book cost too much.
We really need to resolve this over a beer.
is the only thing you are asking to keep plugins files under a
separate folder?
How would the plugin be able to override the layout.html?
How would it be able to overwrite a module (for example a local
customized version of s
You are right, the queue.py code should be put in gaehandler.py.
I have cleaned up the code and posted it here:
http://appengine-cookbook.appspot.com/recipe/hot-handler
It might be a good idea to disable it (comment it out) by default
since it could confuse developers when they try to look at t
Something always bothered be and resulted in lots of uglyness. I
suspected there was a way to fix it but did not know. Now I found out.
The problem:
==
when we do
import a.b.c as d
Python (and web2py) look in sys.path.
If the module is in "web2py/applications/yourapp/modules" then
or perhaps (better) Chapter 4 in
http://www.amazon.com/Principles-Design-Oxford-Advanced-Manufacturing/dp/0195043456/
On Fri, Oct 30, 2009 at 12:39 AM, Yarko Tymciurak <
resultsinsoftw...@gmail.com> wrote:
> see, for example, sections 1.7.5 - 1.7.6 in
> http://www.amazon.com/Axiomatic-Design-Adva
see, for example, sections 1.7.5 - 1.7.6 in
http://www.amazon.com/Axiomatic-Design-Advances-Applications-Manufacturing/dp/0195134664
On Fri, Oct 30, 2009 at 12:32 AM, Yarko Tymciurak <
resultsinsoftw...@gmail.com> wrote:
> On Thu, Oct 29, 2009 at 11:21 PM, mdipierro wrote:
>
>>
>> Let's say we we
Let's if I understand.
1) we copy queue.py in gluon.contrib
2) we edit the web2py app.yaml to include the above modification so
that that url is served by queue.py not web2py
3) google keeps calling itself and the entire web2py app gets cached?
Massimo
On Oct 30, 12:30 am, Robin B wrote:
> L
Sorry. I misunderstood.
create a file web2py/routes.py and in it write
routes_out=[('/admin/(?P.*)','https://hostname/admin/\g')]
where hostname is your hostname or ip address and port.
On Oct 29, 11:46 pm, akonsu wrote:
> Massimo,
>
> thanks for taking time to explain.
>
> my question is not
On Thu, Oct 29, 2009 at 11:21 PM, mdipierro wrote:
>
> Let's say we were to create a new folder called applications/*/
> plugins, put stuff in there and modify web2py to handle the code in
> there in some special way. That the current mechanism in admin for
> packing, unpacking, deleting would st
Looks like google exponentially backs off a task when it fails, so
here is a version that uses eta to schedule the next task 10s in the
future.
### in queue.yaml
queue:
- name: default
rate: 20/m
bucket_size: 1
### in app.yaml
handlers:
- url: /_ah/queue/default
script: queue.py
login: a
I looked at the docs and came up with this code:
### somehow run this code once to insert atleast one task in the queue
from google.appengine.api.labs import taskqueue
taskqueue.add(url='/_ah/queue/default') # will return 404
### add this to queue.yaml
queue:
- name: default
rate: 10/m
bucke
Massimo,
thanks for taking time to explain.
my question is not about running admin over https or http and how
web2py detects this, or how to connect to admin using ssh. i was just
wondering how to emit the correct url. right now the default hello
world app emits relative url for the admin and th
LOL
On Oct 29, 11:01 pm, "mr.freeze" wrote:
> And that's why you're the man. Thanks!
>
> On Oct 29, 10:58 pm, mdipierro wrote:
>
> > why do you need execs?
>
> > import gluon.validators
> > for key in dict(gluon.validators):
> > globals()[key.lower()]=gluon.validators.__dict__[key]
>
> > On
Not quite.
If you are not using a proxy than web2py takes care of this
automatically. web2py detects https and admin will not work without.
If you are using a proxy web2py admin cannot detect https and thinks
it is running from localhost. There is no way to prevent admin from
going over http and
Let's say we were to create a new folder called applications/*/
plugins, put stuff in there and modify web2py to handle the code in
there in some special way. That the current mechanism in admin for
packing, unpacking, deleting would still work. It is because plugins
in a subfolder are simply more
And that's why you're the man. Thanks!
On Oct 29, 10:58 pm, mdipierro wrote:
> why do you need execs?
>
> import gluon.validators
> for key in dict(gluon.validators):
> globals()[key.lower()]=gluon.validators.__dict__[key]
>
> On Oct 29, 10:49 pm, "mr.freeze" wrote:
>
> > That makes sense.
why do you need execs?
import gluon.validators
for key in dict(gluon.validators):
globals()[key.lower()]=gluon.validators.__dict__[key]
On Oct 29, 10:49 pm, "mr.freeze" wrote:
> That makes sense. With that in mind, if I am doing this for my own
> convenience is doing this with exec too co
On Oct 29, 11:41 pm, mdipierro wrote:
> Yes you can. read the routes.examples.py file.
>
thanks, you are saying that rather than emitting the absolute url that
includes https prefix in the markup i need to map the admin url to
https in my routes, right?
konstantin
--~--~-~--~~--
Well, drupal is dealing with PHP - and defining a "standard" interface for
plugins to implement; this is sort of ... I dunno, interesting
messy??? ok (???) - anyway, this is a general approach (not sure how much
useful it has to show for web2py).
Right now, plugins in web2py are hidden on
That makes sense. With that in mind, if I am doing this for my own
convenience is doing this with exec too costly on performance or
unsafe?
On Oct 29, 10:31 pm, mdipierro wrote:
> There is a reason for UPPERCASE. All the web2py API that are defined
> outside the thread are uppercase. Those defi
On Oct 29, 10:26 pm, akonsu wrote:
> hello,
>
> i have discovered web2py just yesturday. so i am completely new,
> please forgive my ignorance. (currently i am using django but i am
> almost convinced now that i need to switch to web2py :) but one thing
> that bothers me so far is that after i in
hello,
i have discovered web2py just yesturday. so i am completely new,
please forgive my ignorance. (currently i am using django but i am
almost convinced now that i need to switch to web2py :) but one thing
that bothers me so far is that after i installed web2py on my
webfaction share it seems
do you have an example of code?
On Oct 29, 10:16 pm, Robin B wrote:
> > neat - now I get it. That's a nice hack!
> > Did you find that out from the Google App Engine group, or thought of
> > it yourself?
>
> Thought of it myself.
>
> Robin
>
> On Oct 29, 12:09 am, Richard wrote:
>
> > neat - no
There is a reason for UPPERCASE. All the web2py API that are defined
outside the thread are uppercase. Those defined in the thread are
lowercase. This means you should treat the uppercase ones as constants
and not change class attributes or your app will affect other apps.
Massimo
On Oct 29, 9:4
Since we are discussing this. I have added distributed transaction
support for mysql and firebird (postgresql was already there).
Example:
db1=DAL('postgres://...')
db2=DAL('mysql://...')
db3=DAL('firebird://...')
SQLDB.distributed_transaction_begin(db1,db2,db3)
db1.table.insert()
db2.table.
I meant to say you can do
db.define_table('y',Field('x','reference y'))
but not
db.define_table('y',Field('x','reference z'))
db.define_table('z',..)
you can only reference a table defined or being defined not a table
that will be defined.
On Oct 29, 8:49 pm, DenesL wrote:
> On 29 oct, 10:13
> neat - now I get it. That's a nice hack!
> Did you find that out from the Google App Engine group, or thought of
> it yourself?
Thought of it myself.
Robin
On Oct 29, 12:09 am, Richard wrote:
> neat - now I get it. That's a nice hack!
> Did you find that out from the Google App Engine group,
Sorry, meant separated with underscores.
On Oct 29, 9:42 pm, "mr.freeze" wrote:
> I love web2py, but I hate the convention of all uppercase separated
> with commas in validators. It's like hitting a speed bump when you're
> doing 80. I am experimenting with converting them to camelcase in my
>
I love web2py, but I hate the convention of all uppercase separated
with commas in validators. It's like hitting a speed bump when you're
doing 80. I am experimenting with converting them to camelcase in my
model and it seems to work fine.
def camelcase_validators():
from gluon.validators im
Can you print to console the post.body? perhpas it is stored escaped
for some reason.
On Oct 29, 8:33 pm, Nick Jennings wrote:
> Hello All,
>
> I'm writing a simple blog and using tinyMCE for text formatting.
> Saving it to the database works fine, but when I try to view it, the
> XHTML is esca
So if two tables need to be joined often, keep them on the same database.
Cool, thanks! :)
-Thadeus
On Thu, Oct 29, 2009 at 8:18 PM, mdipierro wrote:
>
> I am not aware of any any system that allows joins across databases. I
> do not think it is a well defined concept since if information
On 29 oct, 10:13, mdipierro wrote:
> It workd for self references but not if y is yet to be defined.
huh? self reference means 'y' is being defined.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2py-users"
Hello All,
I'm writing a simple blog and using tinyMCE for text formatting.
Saving it to the database works fine, but when I try to view it, the
XHTML is escaped. In the book it says I can use the XML function to
specify I do not want the content escaped. In my simple blog,
In the default/show.
I am not aware of any any system that allows joins across databases. I
do not think it is a well defined concept since if information reside
in distinct places there is no way to guarantee referential integrity.
In web2py you can have tables in distinct with records that reference
each other usin
On Oct 30, 9:44 am, Wes James wrote:
> Is there a way to do this?
>
> WSGIScriptAliasMatch ^/(app|admin)(/.*)?$
> /opt/web2py-1.69.1/wsgihandler.py/$1$2
> WSGIScriptAliasMatch ^/(app2|admin2)(/.*)?$
> /opt/web2py-1.68.1/wsgihandler.py/$1$2
>
> I was trying this earlier and it was kind of glitc
Is this a limitation of using a distributed database system, or just not
having support in the DAL for this yet.
-Thadeus
$
On Thu, Oct 29, 2009 at 5:14 PM, mdipierro wrote:
>
> On Oct 29, 4:54 pm, Thadeus Burgess wrote:
> > So you would have to insert records for each object individually,
Ah, looks like it's already been caught. :) I'll remember that errata
if I see anything else though.
Cheers,
Nick
On Oct 30, 12:30 am, mdipierro wrote:
> Thank you Nick. Would you mind adding it here?
>
> http://wiki.web2py.com/Errata_for_web2py_2nd_Edition_Book
>
> Massimo
>
> http://wiki.web2p
Thank you Nick. Would you mind adding it here?
http://wiki.web2py.com/Errata_for_web2py_2nd_Edition_Book
Massimo
http://wiki.web2py.com
On Oct 29, 6:28 pm, Nick wrote:
> Hi All,
>
> Not sure where this should be reported, but I found what appears to
> be a minor error in the web2py book.
>
>
Hi All,
Not sure where this should be reported, but I found what appears to
be a minor error in the web2py book.
On page 70, the crud example of form handling should use db.comment as
the first param to crud.create, not db.image.
(since it's supposed to be a form that handles comments for the i
Fixed in trunk. I had to study to fix this one.
This is a major problem and calls for a new release asap. If it fixes
it for you I will release.
Massimo
On Oct 29, 5:37 pm, mdipierro wrote:
> Auch this is a major problem. It is a breakage of backward
> compatibility due to one of the new functi
Is there a way to do this?
WSGIScriptAliasMatch ^/(app|admin)(/.*)?$ /opt/web2py-1.69.1/wsgihandler.py/$1$2
WSGIScriptAliasMatch ^/(app2|admin2)(/.*)?$
/opt/web2py-1.68.1/wsgihandler.py/$1$2
I was trying this earlier and it was kind of glitchy. Is there a
better way to do this? I took the 1.68
Auch this is a major problem. It is a breakage of backward
compatibility due to one of the new functions. Back to work
On Oct 29, 5:19 pm, Wes James wrote:
> I've been having problems with t3 with 1.69.1 using sqlite and
> postgres. With sqlite I get this when logging in to t3 wiki
>
> Trac
I've been having problems with t3 with 1.69.1 using sqlite and
postgres. With sqlite I get this when logging in to t3 wiki
Traceback (most recent call last):
File "gluon/main.py", line 440, in wsgibase
session._try_store_on_disk(request, response)
File "gluon/globals.py", line 368, in _t
On Oct 29, 4:54 pm, Thadeus Burgess wrote:
> So you would have to insert records for each object individually, then call
> distributed_transaction_commit.
>
> dba.customers.insert()
> dbb.sales.insert()
>
> dba.distributed_transaction_commit(dba, dbb)
yes
> How would you perform a join?
This fixes it:
def none_exception(value):
"""
returns a cleaned up value that can be used for csv
export:
- unicode text is encoded as such
- None values are replaced with the given representation
(default )
"""
print
So you would have to insert records for each object individually, then call
distributed_transaction_commit.
dba.customers.insert()
dbb.sales.insert()
dba.distributed_transaction_commit(dba, dbb)
How would you perform a join?
dba(dba.customers.id == dbb.sales.id_customer).select()
fo
I'm pretty sure it's caused by DALRef
On Oct 29, 4:52 pm, "mr.freeze" wrote:
> Same error. I'll take a closer look.
>
> On Oct 29, 4:36 pm, mdipierro wrote:
>
> > uploading fix, please check
>
> > On Oct 29, 4:16 pm, "mr.freeze" wrote:
>
> > > Perhaps because of DALRef?
>
> > > >>> rows = db(
Same error. I'll take a closer look.
On Oct 29, 4:36 pm, mdipierro wrote:
> uploading fix, please check
>
> On Oct 29, 4:16 pm, "mr.freeze" wrote:
>
> > Perhaps because of DALRef?
>
> > >>> rows = db(db.purchase.id>0).select()
> > >>> for row in rows:
>
> > ... print row
> > ...
> > at
>
There is a single function. In your case you would call
dba.distributed_transaction_commit(dba,dbb)
or
try:
dba.distributed_transaction_commit(dba,dbb)
except:
session.flash="distributed transaction failed and rolled back"
I have not tried this in some time but when I tried worked
Massimo,
Would you mind giving a more in depth example on distributed transactions
with postgres? I know web2py supports them, however there is not much
information on it. How would you accomplish a join across databases?
Is there an api to abstract this?
dba = DAL('postgres...')
dbb = DAL('post
uploading fix, please check
On Oct 29, 4:16 pm, "mr.freeze" wrote:
> Perhaps because of DALRef?
>
> >>> rows = db(db.purchase.id>0).select()
> >>> for row in rows:
>
> ... print row
> ...
> at
> 0x02E85AF0>, '
> buyer': 9, 'order_date': datetime.date(2009, 10, 10), 'id': 1,
> 'quantity': 1}
Perhaps because of DALRef?
>>> rows = db(db.purchase.id>0).select()
>>> for row in rows:
... print row
...
at
0x02E85AF0>, '
buyer': 9, 'order_date': datetime.date(2009, 10, 10), 'id': 1,
'quantity': 1}>
at
0x02EFBBF0>, '
buyer': 10, 'order_date': datetime.date(2009, 10, 11), 'id': 2,
'quan
Can you email me a diff instead?
Massimo
On Oct 29, 3:42 pm, Jonathan Lundell wrote:
> On Oct 29, 2009, at 1:05 PM, mdipierro wrote:
>
> > ok make you search for all occurrences in applications/example/ and
> > gluon/
>
> There's preliminary code
> here:http://lobitos.net/web2py-patches/gluon
On Oct 29, 2009, at 1:05 PM, mdipierro wrote:
> ok make you search for all occurrences in applications/example/ and
> gluon/
There's preliminary code here:
http://lobitos.net/web2py-patches/gluon/validators.py
If that looks generally OK, please let me know and I'll complete the
patch.
The
Also in trunk, experimental, ability to decorate web2py actions that
return strings with third party WSGI middleware. Example:
#define or import WSGI Middleware
class MiddlewareUpper:
def __init__(self,app):
self.app = app
def __call__(self,environ, start_response):
items
I must have had a typo because this now works great.
(code for anyone else that has this same qustion)
--Working Code
for item in list:
fields.append(Field(item,requires=IS_INT_IN_RANGE
(0,100,error_message=('Must be an Int 0 to 100'
for item in list2:
fields.
Oh great thats even cleaner, can I add validators to a form built this
way while you're here?
On Oct 29, 3:04 pm, mdipierro wrote:
> or in one line
>
> form=SQLFORM.factory(*[Field(item) for item in list])
>
> On Oct 29, 2:41 pm, Chris S wrote:
>
> > That's great, I'm sure I'll find all sorts o
ok make you search for all occurrences in applications/example/ and
gluon/
On Oct 29, 2:46 pm, Jonathan Lundell wrote:
> On Oct 29, 2009, at 10:36 AM, mdipierro wrote:
>
>
>
> > I hate these kind of changes because they affect syntax highlighing
> > and a lot of example pages. Do you feel stron
or in one line
form=SQLFORM.factory(*[Field(item) for item in list])
On Oct 29, 2:41 pm, Chris S wrote:
> That's great, I'm sure I'll find all sorts of places that's useful now
> that I know about it.
> Now that I can dynamically build my Fields for my list, I've tried to
> go back and put a re
On Oct 29, 2009, at 10:36 AM, mdipierro wrote:
>
> I hate these kind of changes because they affect syntax highlighing
> and a lot of example pages. Do you feel strongly about this?
Not so strongly. Only that a difference in name suggests a difference
in meaning, and when that's not true, it's
That's great, I'm sure I'll find all sorts of places that's useful now
that I know about it.
Now that I can dynamically build my Fields for my list, I've tried to
go back and put a requirement on them for validation. You can't use
keywords in a list so I'm a little stumped.
Is there a suggestion
I cannot get this right today. Fixed now I think.
On Oct 29, 2:18 pm, "mr.freeze" wrote:
> svn trunk head.
>
> if isinstance(key,str) and key.count('.')==1:
> (table, field) = key.strip('.')
>
> Throws an error since you're not splitting the key.
>
> On Oct 29, 2:16 pm, mdipi
Looks like you just fixed it. Tested and working both ways now:
>>> rows = db(purchase.product==product.id)(purchase.buyer==buyer.id).select()
>>> rows.as_dict(key="buyer.id")
or
>>>rows.as_dict(key=lambda row: row['buyer']['id'])
On Oct 29, 2:18 pm, "mr.freeze" wrote:
> svn trunk head.
>
>
svn trunk head.
if isinstance(key,str) and key.count('.')==1:
(table, field) = key.strip('.')
Throws an error since you're not splitting the key.
On Oct 29, 2:16 pm, mdipierro wrote:
> 1.69.2 or 1.70.1 ?
>
> On Oct 29, 2:13 pm, "mr.freeze" wrote:
>
> > I think this line (3
1.69.2 or 1.70.1 ?
On Oct 29, 2:13 pm, "mr.freeze" wrote:
> I think this line (3149):
> (table, field) = key.strip()
>
> Should be:
> (table, field) = key.split(".")
>
> On Oct 29, 1:56 pm, mdipierro wrote:
>
> > OK, I merged yours and mine in trunk.
>
> > On Oct 29, 1:44 pm, "mr.freeze" wrote
I think this line (3149):
(table, field) = key.strip()
Should be:
(table, field) = key.split(".")
On Oct 29, 1:56 pm, mdipierro wrote:
> OK, I merged yours and mine in trunk.
>
> On Oct 29, 1:44 pm, "mr.freeze" wrote:
>
> > I am still testing your solution but here is mine in the meantime. It
OK, I merged yours and mine in trunk.
On Oct 29, 1:44 pm, "mr.freeze" wrote:
> I am still testing your solution but here is mine in the meantime. It
> lets you say rows.as_list(key="buyer.id") for joins
>
> def as_dict(self,
> key='id',
> compact=True,
>
sorry, I meant rows.as_dict(key="buyer.id")
On Oct 29, 1:44 pm, "mr.freeze" wrote:
> I am still testing your solution but here is mine in the meantime. It
> lets you say rows.as_list(key="buyer.id") for joins
>
> def as_dict(self,
> key='id',
> compact=True,
now we are
On Oct 29, 1:33 pm, Alex Fanjul wrote:
> Massimo, we are not here, and we should!
>
> http://wsgi.org/wsgi/Frameworks
>
> Alex F
>
> El 29/10/2009 16:32, mdipierro escribió:
>
> > WSGI app
>
> --
> Alejandro Fanjul Fdez.
> alex.fan...@gmail.comwww.mhproject.org
--~--~-~--~
I am still testing your solution but here is mine in the meantime. It
lets you say rows.as_list(key="buyer.id") for joins
def as_dict(self,
key='id',
compact=True,
storage_to_dict=True,
datetime_to_str=True):
rows = sel
Massimo, we are not here, and we should!
http://wsgi.org/wsgi/Frameworks
Alex F
El 29/10/2009 16:32, mdipierro escribió:
> WSGI app
--
Alejandro Fanjul Fdez.
alex.fan...@gmail.com
www.mhproject.org
--~--~-~--~~~---~--~~
You received this message because you ar
here is what happened:
1) you inserted records that had Null values for number
2) you added the attribute notnull=True but those records are still
there
3) you ask for a different length (which would require moving data
over)
before you do the migration run
db(db.address.number==None).update(num
it seems to me if you join as_dict, the key cannot be always a single
field. I have a proposed solution in trunk
On Oct 29, 12:22 pm, "mr.freeze" wrote:
> as_list seems to be recursing properly now. Same error on as_dict but
> I am digging deeper.
>
> On Oct 29, 12:12 pm, mdipierro wrote:
>
>
In db.py I have the following table definition:
db.define_table('address',
db.Field(..),
db.Field('number',length=6,default='',notnull=True),
db.Field(),
migrate='address.table')
I needed to set the length of the number column to 9 characters:
db.define_table('address',
d
I hate these kind of changes because they affect syntax highlighing
and a lot of example pages. Do you feel strongly about this?
On Oct 29, 12:25 pm, Jonathan Lundell wrote:
> On Oct 29, 2009, at 10:14 AM, Jonathan Lundell wrote:
>
>
>
> > On Oct 29, 2009, at 9:57 AM, mdipierro wrote:
>
> >> sen
On Oct 29, 2009, at 10:14 AM, Jonathan Lundell wrote:
>
> On Oct 29, 2009, at 9:57 AM, mdipierro wrote:
>
>>
>> send me a patch
>
> OK.
>
> Do you want to strip spaces? White space generally? If so, should
> IS_NULL_OR do the same?
I see that stripping is there already.
Another question: why is
as_list seems to be recursing properly now. Same error on as_dict but
I am digging deeper.
On Oct 29, 12:12 pm, mdipierro wrote:
> I actually think i fixed the recursive dictit but it still could use
> some testing.
>
> Massimo
>
> On Oct 29, 11:58 am, mdipierro wrote:
>
> > True. The issue wi
On Oct 29, 2009, at 9:57 AM, mdipierro wrote:
>
> send me a patch
OK.
Do you want to strip spaces? White space generally? If so, should
IS_NULL_OR do the same?
>
> On Oct 29, 11:31 am, Jonathan Lundell wrote:
>> On Oct 29, 2009, at 9:23 AM, mdipierro wrote:
>>
>>
>>
>>> You can already do t
I actually think i fixed the recursive dictit but it still could use
some testing.
Massimo
On Oct 29, 11:58 am, mdipierro wrote:
> True. The issue with JOIN is not an easy one to fix.
>
> Can you send me a patch about one or both issues?
>
> Massimo
>
> On Oct 29, 11:43 am, "mr.freeze" wrote:
True. The issue with JOIN is not an easy one to fix.
Can you send me a patch about one or both issues?
Massimo
On Oct 29, 11:43 am, "mr.freeze" wrote:
> Also, the as_list function only converts the first level of DALStorage
> to dict when storage_to_dict is true. Both function (as_list,as_dic
send me a patch
On Oct 29, 11:31 am, Jonathan Lundell wrote:
> On Oct 29, 2009, at 9:23 AM, mdipierro wrote:
>
>
>
> > You can already do that by piping cleanup which would remove unmached
> > charatacters or using IS_MATCH() validator.
>
> CLEANUP obviates the need for any change at all (and it
Also, the as_list function only converts the first level of DALStorage
to dict when storage_to_dict is true. Both function (as_list,as_dict)
should probably recurse through all level right?
On Oct 29, 11:27 am, "mr.freeze" wrote:
> Works for normal queries but throws a KeyError on id for joins.
On Oct 29, 2009, at 9:23 AM, mdipierro wrote:
>
> You can already do that by piping cleanup which would remove unmached
> charatacters or using IS_MATCH() validator.
CLEANUP obviates the need for any change at all (and it doesn't really
do what I'm suggesting). MATCH might. But the point of th
Works for normal queries but throws a KeyError on id for joins.
On Oct 29, 10:12 am, mdipierro wrote:
> ok, in trunk, take a look.
>
> On Oct 29, 9:26 am, Renato-ES-Brazil wrote:
>
> > I agree.
>
> > On 29 out, 12:19, "mr.freeze" wrote:
>
> > > I think it is worth adding an as_dict function to
It works! Thank you very much.
On Oct 29, 11:13 am, mdipierro wrote:
> try:
>
> def index():
> records = {}
> if request.vars.boton:
> key=request.vars.dato
> for tablename in db.tables:
> table=db[tablename]
> fields=[table[fieldname] for fieldnam
You can already do that by piping cleanup which would remove unmached
charatacters or using IS_MATH() validator.
On Oct 29, 11:18 am, Jonathan Lundell wrote:
> On Oct 29, 2009, at 9:01 AM, mdipierro wrote:
>
>
>
> > I do not disagree. Shall we make is_not_empty strip?
>
> If it's going to change
On Oct 29, 2009, at 9:01 AM, mdipierro wrote:
>
> I do not disagree. Shall we make is_not_empty strip?
If it's going to change, how about (also) an optional argument,
defaulting to None, that's a string that counts as empty? I'm thinking
of the case in which you put instructions to the user
try:
def index():
records = {}
if request.vars.boton:
key=request.vars.dato
for tablename in db.tables:
table=db[tablename]
fields=[table[fieldname] for fieldname in table.fields]
queries=[field.like('%'+key+'%') for field in fields if
f
ERRATA: Fixed a problem in trunk and here is a better example:
# sample test app
def test_wsgi_app(environ, start_response):
"""just a test app"""
status = '200 OK'
response_headers = [('Content-type','text/plain'),('Content-
Length','13')]
start_response(status, response_headers)
I would think so yes.
-Thadeus
On Thu, Oct 29, 2009 at 11:01 AM, mdipierro wrote:
>
> I do not disagree. Shall we make is_not_empty strip?
>
> On Oct 29, 10:43 am, Thadeus Burgess wrote:
> > Ok, I guess I just figured that IS_NOT_EMPTY would check for if the
> string
> > was blank as well.
Hi, i have a problem running this.
def index():
records = {}
if request.vars.boton:
key=request.vars.dato
for tablename in db.tables:
table=db[tablename]
fields=[table[fieldname] for fieldname in table.fields]
queries=[field.like('%'+key
I do not disagree. Shall we make is_not_empty strip?
On Oct 29, 10:43 am, Thadeus Burgess wrote:
> Ok, I guess I just figured that IS_NOT_EMPTY would check for if the string
> was blank as well.
>
> Thanks for clarifying
>
> -Thadeus
>
> On Thu, Oct 29, 2009 at 10:40 AM, mdipierro wrote:
> > tu
This got buried in a previous thread but it is important. In trunk we
have and experimental feature:
request.wsgi.environ and request.wsgi.start_response
this means that you can now call ANY wsgi function from inside a
web2py action:
def index():
some_wsgi_app(request.wsgi.environ,request.w
Ok, I guess I just figured that IS_NOT_EMPTY would check for if the string
was blank as well.
Thanks for clarifying
-Thadeus
On Thu, Oct 29, 2009 at 10:40 AM, mdipierro wrote:
> tually is CLEANUP() or CLENAUP(regex='.') that does that.
> I do not think we agreed to anything el
>
--~--~---
On Oct 29, 2009, at 8:36 AM, Chris S wrote:
>
> lol, well I've been all around that. Thank you so much, works just
> fine now.
>
> Is there a quick 2-min "why that works" or somewhere you could point
> me to as to what that * means/does? Apparently I'm missing out on
> something important.
It'
http://docs.python.org/tutorial/controlflow.html#tut-unpacking-arguments
* is a python reserved keyword that when placed in front of a list or tuple,
it means "Unpack this list"
** does the same, but unpacks a dictionary into variables.
so if you do something like
def afunc(var1, var2, var3, va
actually is CLEANUP() or CLENAUP(regex='.') that does that.
I do not think we agreed to anything else.
On Oct 29, 10:35 am, Thadeus Burgess wrote:
> I vaguely remember some discussion about this, but should IS_NOT_EMPTY trim
> the value?
>
> The below passes validation, so when spaces are ent
lol, well I've been all around that. Thank you so much, works just
fine now.
Is there a quick 2-min "why that works" or somewhere you could point
me to as to what that * means/does? Apparently I'm missing out on
something important.
On Oct 29, 10:33 am, mdipierro wrote:
> form=SQLFORM.factory
I vaguely remember some discussion about this, but should IS_NOT_EMPTY trim
the value?
The below passes validation, so when spaces are entered into the form (or by
a robot), it gets inserted into the database.
I'm assuming the proper way of using this is using it in conjunction with
the CLEANUP v
1 - 100 of 139 matches
Mail list logo