Hello,
I have a table that links to multiple "media" tables so I use
with_alias().
I found that the following causes an error:
model = db.media.with_alias('model')
but this works:
model = db.media.with_alias('model_z')
I do have a "model" table so they must be conflicting. What
restrictions d
http://www.web2pyslices.com/main/slices/take_slice/17
Still work in progress, but testing locally seems to work.
HC
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To post to this group, send e
http://www.web2pyslices.com/main/slices/take_slice/17
On 28 Okt., 19:47, mdipierro wrote:
> cool! would you make a pyslice?
>
> On Oct 28, 12:20 pm, hcvst wrote:
>
> > Rough and dirty - but works for capabilities.xml already. It's odd
> > that google's start_response returns a write method - at
If I write something like this on my index view I got an error:
-
response.write(A(row.autori.nome_autore.title(), _href=URL(r=request,
f="autore", args=row.autori.id) _title="visualizza autori"))
^
SyntaxError: invalid syntax
-
Hi.
Your missing a comma before the _title attribute.
regards
mmlado
On Thursday 29 October 2009 11:26:01 Doxaliber wrote:
> response.write(A(row.autori.nome_autore.title(), _href=URL(r=request,
> f="autore", args=row.autori.id) _title="visualizza autori"))
>
> ^
> SyntaxError: invalid syntax
This is the messege that I receive from the fault event on the remote
object ...
(mx.messaging.messages::ErrorMessage)#0
body = (Object)#1
clientId = (null)
correlationId = "A1177FFF-9229-469A-DEB1-9FDB5D961B5D"
destination = ""
extendedData = (null)
faultCode = "Client.Error.MessageS
I have the following data structure, what I want is the following:
if the data entered is not in the database to enter it, then redirect
to student
information to enter the new data for the student. Once the data is
in, the next time I enter the same data,the program compares the
student ID in the
Hello I have encountered the following problem:
Given: adefine_table(x) and define_table(y) ;if table y is below
table x in the database, table y can reference table x, but table x
can not reference table y
--~--~-~--~~~---~--~~
You received this message because
thanks mdipierro:
my interest is to put my codes under one folder and call them from the
model on an instance of SQLDB object (just like web2py's
create_table).
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2
if crud.settings.auth=auth, then 404 not found error when insert and
other crud functions are use, if #crud.settings.auth=auth the error no
longer shows
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2py-users" g
Thank you Mladen, I couldn't figure out where the error was. :-/ This is
the result of inexperience with web2py.. :-P
2009/10/29 Mladen Milankovic
>
> Hi.
>
> Your missing a comma before the _title attribute.
>
> regards
> mmlado
>
> On Thursday 29 October 2009 11:26:01 Doxaliber wrote:
> > resp
awesome now it works, I had to wrap some vars with str() and booom
@service.rss
def showLatest():
shopnames = db().select(db.shopname.ALL,limitby=(0,20))
return dict(
title=str(response.title),
link=URL(request.application,'default','call',args=
['rss','showLatest'
Nice!
On Oct 29, 3:11 am, hcvst wrote:
> http://www.web2pyslices.com/main/slices/take_slice/17
>
> Still work in progress, but testing locally seems to work.
>
> HC
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"w
This book shows how drupal modules works in detail...
http://mhproject.org/media/users/aleksdj/Learning.Drupal.6.Module.Development.May.2008.pdf
Alex F
El 29/10/2009 5:46, mdipierro escribió:
> I agree. Can you help me find such articles?
>
> for now a plugin is just any subset of an app with a
Could you tell me some example of what is a wave robot for? Is it the
same as a typical gtalk translator robot (en...@bot.talk.google.com)
where you can send a word and he replay with traslation? or it is more
advanced?
thanks
alex f
El 29/10/2009 9:11, hcvst escribió:
> http://www.web2pyslic
More on drupal modules development:
http://drupal.org/developing/modules
El 29/10/2009 5:46, mdipierro escribió:
> I agree. Can you help me find such articles?
>
> for now a plugin is just any subset of an app with a naming
> convention. This is just a place where to put something more
> structur
In all cases the code can not find the data in the database even if it
exists;
the redirect is not executed;
also may be the request.args(0) logic is wrong. Any help on this,
those experienced web2py users
On Oct 29, 7:03 am, dbb wrote:
> I have the following data structure, what I want is the
while this happens no decoration of security is used for any function
in the controller
On Oct 29, 7:14 am, dbb wrote:
> if crud.settings.auth=auth, then 404 not found error when insert and
> other crud functions are use, if #crud.settings.auth=auth the error no
> longer shows
--~--~-~--
The alias translates literally into AS in SQL, therefore it
cannot be an existing table, a field or a reserved database keyword.
On Oct 29, 2:21 am, Richard wrote:
> Hello,
>
> I have a table that links to multiple "media" tables so I use
> with_alias().
>
> I found that the following causes an
We should think of a way to expose a standard
environment,start_response to web2py action so that they can call wsgi
apps directly.
On Oct 29, 3:36 am, hcvst wrote:
> http://www.web2pyslices.com/main/slices/take_slice/17
>
> On 28 Okt., 19:47, mdipierro wrote:
>
> > cool! would you make a pysli
Perahps you need to upgrade web2py. You may be using a buggy version.
For sure the old wegiserver had a bug related to timeout.
On Oct 27, 5:33 am, Felipe wrote:
> Dont know... because in my wsgiserver.py there is no such line ...
>
> and yes, I can browse the site without flex
>
> On 26 out, 13
Hi dbb,
yes you can, instead of
Field('x1', db.y)
use
Fields('x1','reference y')
it also works on self-references.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To post to this group, sen
There is a way around but the reason we do not try to make this easy
is because this is usually a symptom for a different problems. Instead
of having two tables that reference each other probably you need a
many to many relationship that should be implemented using a link
table. Can you tell us mo
On Oct 29, 4:49 am, mdipierro wrote:
> actually I also need this often. I normally do
> item_dict=dict([*r.id,r) for r in db(db.items.id > 0).select()])
> or
> item_dict=dict([*r.id,r) for r in db(db.items.id > 0).select().as_list
> ()])
Looks nice - but there's a typo & I can't quite get the co
there are meny problems here.
1) in index you do insert after redirect so the insert is never
executed
2) you use new_student instead of rquest.vars.new_student
3) you access form.vars in action where it is not defined (after
redirect)
4) you denormalize the student name in student_information (so
This the intend behavior. If you want to enforce authentication on
crud, you will not be allowed to access actions that do crud on a
table unless you have specifically registered a permission for the
user 'insert' in that table and you must be logged in.
On Oct 29, 6:14 am, dbb wrote:
> if crud.
oops.there should be no sterisk.
item_dict=dict([(r.id,r) for r in db(db.items.id > 0).select()])
On Oct 29, 8:30 am, Fran wrote:
> On Oct 29, 4:49 am, mdipierro wrote:
>
> > actually I also need this often. I normally do
> > item_dict=dict([*r.id,r) for r in db(db.items.id > 0).select()])
>
On Oct 29, 1:52 pm, mdipierro wrote:
> oops.there should be no sterisk.
> item_dict=dict([(r.id,r) for r in db(db.items.id > 0).select()])
Great, that works ;)
This one still fails:
item_dict=dict([(r.id,r) for r in db(db.items.id > 0).select().as_list
()])
'dict' object has no attribute 'id'
My bad again
item_dict=dict([(r['id'],r) for r in db(db.items.id > 0).select
().as_list()])
On Oct 29, 8:58 am, Fran wrote:
> On Oct 29, 1:52 pm, mdipierro wrote:
>
> > oops.there should be no sterisk.
> > item_dict=dict([(r.id,r) for r in db(db.items.id > 0).select()])
>
> Great, that works ;
I think it is worth adding an as_dict function to Rows personally.
On Oct 29, 9:01 am, mdipierro wrote:
> My bad again
>
> item_dict=dict([(r['id'],r) for r in db(db.items.id > 0).select
> ().as_list()])
>
> On Oct 29, 8:58 am, Fran wrote:
>
> > On Oct 29, 1:52 pm, mdipierro wrote:
>
> > > oop
Thanks Massimo
On Oct 29, 9:51 am, mdipierro wrote:
> This the intend behavior. If you want to enforce authentication on
> crud, you will not be allowed to access actions that do crud on a
> table unless you have specifically registered a permission for the
> user 'insert' in that table and you
I agree.
On 29 out, 12:19, "mr.freeze" wrote:
> I think it is worth adding an as_dict function to Rows personally.
>
> On Oct 29, 9:01 am, mdipierro wrote:
>
> > My bad again
>
> > item_dict=dict([(r['id'],r) for r in db(db.items.id > 0).select
> > ().as_list()])
>
> > On Oct 29, 8:58 am, Fran
I sent you the actual data
On Oct 29, 9:29 am, mdipierro wrote:
> There is a way around but the reason we do not try to make this easy
> is because this is usually a symptom for a different problems. Instead
> of having two tables that reference each other probably you need a
> many to many rela
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 Rows personally.
>
> > On Oct 29, 9:01 am, mdipierro wrote:
>
> > > My bad again
>
> > > item_dict=dict([(r['id'],r
It workd for self references but not if y is yet to be defined.
On Oct 29, 8:29 am, DenesL wrote:
> Hi dbb,
>
> yes you can, instead of
>
> Field('x1', db.y)
>
> use
>
> Fields('x1','reference y')
>
> it also works on self-references.
--~--~-~--~~~---~--~~
You rec
I think a "robot" is referring to their API to talk with Google Wave.
-Thadeus
On Thu, Oct 29, 2009 at 8:00 AM, Alex Fanjul wrote:
>
> Could you tell me some example of what is a wave robot for? Is it the
> same as a typical gtalk translator robot (en...@bot.talk.google.com)
> where you can
I've been trying to get a form built where the number of Fields are
dynamic. I was successful with the plan form by using:
Form Implementation
fields=[]
for item in list:
fields.append(item)
fields.append(INPUT(_name=item,requires=IS_INT_IN_RANG
I made some changes in trunk that allows you access wsgi directly,
based on your code.Instead of
# Web2py function
def process():
def start_response(status, headers, exc_info=None):
http_code, _ = status.split(' ',1)
if http_code == '200':
for k,v in headers:
form=SQLFORM.factory(*[fields[num] for num in range(len(fields))])
On Oct 29, 10:25 am, Chris S wrote:
> I've been trying to get a form built where the number of Fields are
> dynamic. I was successful with the plan form by using:
> Form Implementation
> field
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
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
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
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
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'
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
>
--~--~---
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
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
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 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.
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)
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
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
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
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
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
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
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.
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
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
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:
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
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 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
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
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
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:
>
>
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
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
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
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
--~--~-~--~
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,
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,
>
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
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
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
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.
>
>
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
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
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
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
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
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
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.
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
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
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
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
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}
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
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
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
>
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(
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
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
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?
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
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
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
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
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
1 - 100 of 139 matches
Mail list logo