Same problem here - all works fine but am using an after_update callback on
a child record but the compute doesn't work when the parent record values
are updated.
On Tuesday, June 19, 2012 at 2:24:05 AM UTC+10, Brandon Reynolds wrote:
>
> I have this problem when i try to generate thumbnails.
hi,
i face the same problem, when trying to update the other table that have
computed field with after_update callback.
e.g.
# after_update_purchase_header
def __after_update_purchase_header(s, f):
purchase = s.select().first()
# purchase_header
db(db.purchase_detail.purchase_no == purchase.id).
On Wednesday, 18 September 2013 01:05:28 UTC+10, Anthony wrote:
>
> On Monday, September 16, 2013 9:07:35 PM UTC-4, Tim Richardson wrote:
>
>> The importance of definition order is in the book
>
>
> Where specifically? Are you talking about the fact that a computed field
> can depend on a previo
On Monday, September 16, 2013 9:07:35 PM UTC-4, Tim Richardson wrote:
> The importance of definition order is in the book
Where specifically? Are you talking about the fact that a computed field
can depend on a previously defined computed field (but not a computed field
that hasn't been define
The importance of definition order is in the book
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to
On Sunday, September 15, 2013 10:27:51 AM UTC-4, step wrote:
> Sorry for resurrecting such an old thread, but I wanted to add my solution
> to a very similar issue.
> It might seem obvious to expert web2py users; I found out that when some
> compute fields weren't updating in my app it was due t
Sorry for resurrecting such an old thread, but I wanted to add my solution
to a very similar issue.
It might seem obvious to expert web2py users; I found out that when some
compute fields weren't updating in my app it was due to unordered
cross-dependencies. In other words, if the computation of
sorry, I posted a new threat about it...
https://groups.google.com/forum/?fromgroups=#!topic/web2py/8RWkVAYVG1c
s.
Il giorno martedì 22 gennaio 2013 23:14:17 UTC+1, Massimo Di Pierro ha
scritto:
>
> What web2py version? I cannot reproduce this.
>
> On Friday, 11 January 2013 14:13:04 UTC-6, palom
What web2py version? I cannot reproduce this.
On Friday, 11 January 2013 14:13:04 UTC-6, palomar wrote:
>
> Sorry but I have the same problem; i tried with readable=true and
> writable=true and to comment the line in DAL.py, but nothing.
> I have this table:
> db.define_table('magazzino',
>
Sorry but I have the same problem; i tried with readable=true and
writable=true and to uncomment the line in DAL.py, but nothing.
I have this table:
db.define_table('magazzino',
Field('id_tipo', 'integer',default=0),
Field('p_p','double', default=0.0),
Field('pp_tot','double', writabl
Thank you so much i got it working. I removed the readable=false and
writable=false and it works on update now. Those are not needed anyway
because when the compute field is added on the model it hides it
automatically.
Brandon
On Thursday, August 9, 2012 2:14:42 PM UTC-6, Deidre wrote:
>
>
If you look at issue 822 you will see an example of a thumb that works on
update. As the comments say, you have to not set writeable to false for the
thumb. If you do set writeable to false then compute only works on add not
edit or update.
So my experience is that compute for images to create a
Has anyone found a way to fix this yet? Or is there a thumbnail module out
now? Like django's http://djangothumbnails.com/
Brandon
On Monday, June 18, 2012 10:24:05 AM UTC-6, Brandon Reynolds wrote:
>
> I have this problem when i try to generate thumbnails. If the field is
> empty it inserts t
as a workaround in my update statement, I updated the computed field to be
the computed field via
mint_order =
db(db.mint_orders2.id==coin.deannas_dough.mint_orders_id).select(db.mint_orders2.ALL)[0]
db(db.mint_orders2.id==mint_order.id).update(num_won=num_won+1,image_thumb=mint_order.image_thu
I have a much older build, and I have this issue as well. The compute
field gives me an error when I do an update, 'key error' image
On Wednesday, June 20, 2012 9:08:31 PM UTC-7, Brandon Reynolds wrote:
>
> If i am not the only one not having i think it's possible it may be a
> web2py bug. I be
If i am not the only one not having i think it's possible it may be a
web2py bug. I bet it is only a bug in update fields as i have seem some
other complaints online. I have filed a bug ticket. Hopefully it is fixed
soon. I am only a beginner programmer so i still am learning debugging and
how
Oh, my bad. You're right, looks like not updating. Will dig in more. Sorry
about that.
pbreit,
I just used your script and my first time thumbnails are working again.
However the are still not computing on update. Do your thumbnails compute
when updating?
Brandon
On Wednesday, June 20, 2012 1:58:12 PM UTC-6, pbreit wrote:
>
> Mine seems to work OK with current trunk:
>
> db.item
Mine seems to work OK with current trunk:
db.item.image_thumb.compute = lambda r: resize_image(r['image'], (150,130),
'thumb')
def resize_image(image, size, path, rotate=0):
if image:
try:
img = Image.open('%sstatic/uploads/%s' % (request.folder,
image))
img
You are correct. I am still sort of new to python and i didn't realize that
.thumbnail was a PIL method. However after i fixed that issue it still
isn't working at all. Does anyone have a simple script to do thumbnails?
Maybe one that doesn't involve compute.
Brandon
On Tuesday, June 19, 201
I don't understand this line:
img.db_photo_var((nx, ny), Image.ANTIALIAS)
why isn't it this??
img.thumbnail((nx, ny), Image.ANTIALIAS)
Isn't thumbnail a method in PIL? Maybe I'm missing something?
Regards,
David
I have spend a long time on this and haven't come up with a fix. My script
is back to the original but oddly enough not the new record thumbnails
aren't generating either. I had the files when they were working saved
elsewhere and just put them back in. Now thumbnails aren't generating at
all.
Basically the function _listify is called by both inser and update. It
figures out which fields are missing and gets their default, update or
computed value. Looks like it is not calling compute. It has three loops:
for name in fields:
...
for ofield in self:
Peter,
I tried your fix with no luck. It did not work unfortunately.
Massimo,
I replaced the lines you specified with no luck. It never printed out
computing. What should we try to next to debug this?
Brandon
On Tuesday, June 19, 2012 8:28:20 AM UTC-6, Massimo Di Pierro wrote:
>
> I need your
I need your help debugging this. In dal.py there are these lines:
def _listify(self,fields,update=False):
for ofield in self:
if not ofield.name in new_fields_names and ofield.compute:
try:
new_fields.append((ofield,ofield.compute(Row(fie
I think this is closely connected to an existing Issue 687 (Compute= should
work always, not once):
http://code.google.com/p/web2py/issues/detail?id=687
Regards
On Monday, June 18, 2012 11:21:57 PM UTC+2, peter wrote:
>
> I would try removing the readable and writeable false for the compute
>
I would try removing the readable and writeable false for the compute
fields. It seems that it does automatically not show them. I found that
setting readable and writeable to False means the thumbs only get computed
on insert, not update. I reported this a while back.
Peter
On Monday, 18 June
Will look into this asap. Please open a ticket about it so that it is
tracked.
On Monday, 18 June 2012 14:40:30 UTC-5, Brandon Reynolds wrote:
>
> In a new record a thumbnail is correctly generated from photo. But if I
> didn't upload a photo or want to change the photo the thumbnail doesn't
>
In a new record a thumbnail is correctly generated from photo. But if I
didn't upload a photo or want to change the photo the thumbnail doesn't
generate. So basically a new record works properly but when updating
nothing in the thumbnail changes at all whether or not is currently has a
photo in
Let me understand this better.
on insert, the thumbnails are created.
on update, if you upload a new photo1 is photo_thing1 generated?
Can you provide a simpler code to reproduce the problem with a just one
upload field and one thumbnail field?
massimo
On Monday, 18 June 2012 11:24:05 UTC-
30 matches
Mail list logo