[web2py] Re: How to create object of 'Storage' In class I created?

2014-07-11 Thread Omri Levy
, 2014 4:23:41 AM UTC+2, Omri Levy wrote: Hi , I have created a class (that i put in models folder), and all it methods returns complicated dictionaries. When I try to access these variables like Storage (foo.bar) I get the following exception: 'dict' object has no attribute I thought

[web2py] How to create object of 'Storage' In class I created?

2014-07-10 Thread Omri Levy
automatically into Storage, but i guess they don't. I've tried to wrap the return value with Storage constructor but then I get an exception saying that there is no such thing as Storage. Can someone please enlighten me? Thanks , Omri. -- Resources: - http://web2py.com - http://web2py.com/book

[web2py] Debug Web2py with Wing IDE

2014-06-26 Thread Omri Levy
Hi , I asked Wing support the following question: I am using Web2py framework. I saw a video that says the Wing can debug a running python code no matter if it launched it itself. When reading this: http://wingware.com/doc/howtos/web2py I see that I can only debug Web2py in a way that I need

[web2py] Re: A way to trigger method on update?

2014-06-26 Thread Omri Levy
Thank you! :) On Thursday, June 26, 2014 12:25:00 AM UTC+3, 黄祥 wrote: afaik, compute didn't work on update. for onupdate, is execute on form level not on dal, please take a look at book chapter about that. ref: http://web2py.com/books/default/chapter/29/07/forms-and-validators best

[web2py] Re: A way to trigger method on update?

2014-06-25 Thread Omri Levy
Yes. I have read ALL the DAL section from the manual and I think you are right. I just wonder if I could use the 'compute' or 'filter in' function as well. I never heard of form 'on update'. Is it web2py feature? Thanks! :) On Wednesday, June 25, 2014 9:58:41 AM UTC+3, 黄祥 wrote: i think you

[web2py] A way to trigger method on update?

2014-06-24 Thread Omri Levy
Hi, Is there a way to call a method when certain field is updated? The intention is *not* to change the value of the field/represent it otherwise, but it has general purpose. Thanks! Omri. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py

[web2py] Re: Ticket in Appadmin when viewing a table

2014-06-21 Thread Omri Levy
/master.zip Unzip it and copy web2py over the old one. On Thursday, 19 June 2014 17:28:41 UTC-5, Omri Levy wrote: Hi Massimo, Thanks , I experience this bug a lot, I think it's when I update list of references to the same table in the db. Can you please explain how to update? (do I need

[web2py] Re: Trying to use the LOAD helper, if a button is clicked

2014-06-19 Thread Omri Levy
the $.web2py.component() Javascript function. Something like: input type=button value=Edit onclick=$.web2py.component('{{=URL(' default', 'edit_page.load')}}', 'edit-form'); div id=edit-form/div Anthony On Friday, June 13, 2014 7:47:34 PM UTC-4, Omri Levy wrote: Hi , So I have a ticket system, and I

[web2py] Ticket in Appadmin when viewing a table

2014-06-19 Thread Omri Levy
type 'exceptions.TypeError' sequence item 0: expected string, long found Versionweb2py™Version 2.9.5-stable+timestamp.2014.03.16.02.35.39PythonPython 2.7.6: C:\Python27\python.exe (prefix: C:\Python27)Traceback 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. Traceback (most recent call last):

[web2py] Re: Ticket in Appadmin when viewing a table

2014-06-19 Thread Omri Levy
Hi Massimo, Thanks , I experience this bug a lot, I think it's when I update list of references to the same table in the db. Can you please explain how to update? (do I need Git?) / Manually fix it? Thanks again , Omri. On Friday, June 20, 2014 1:17:08 AM UTC+3, Massimo Di Pierro wrote

[web2py] Trying to use the LOAD helper, if a button is clicked

2014-06-14 Thread Omri Levy
Hi , So I have a ticket system, and I want to allow user to edit the ticket without leaving the page. I don't want to LOAD the edit_page and hide it, but only load it once user is clicking on the ticket body. Another thing is, when user edits the ticket, he should again see changes on the same

[web2py] Adding information to certain input before added to db?

2014-06-06 Thread Omri Levy
When using SQLFORM, is it possible to check for certain input and change it before it is being stored in db? -- 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)

[web2py] Can I change a value from a form before it is processed?

2014-06-06 Thread Omri Levy
previous user_ids? Thanks! Omri. -- 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 the Google Groups

[web2py] Speeding up the admin interface

2012-08-24 Thread Omri Har-Shemesh
file). Do you have any suggestions as to how to speed up the admin interface? Or, for that matter, the server response time which is sometimes quite long? Thanks, Omri Har-Shemesh --

Re: [web2py] Re: Suggestion - a pickled DAL field

2012-08-10 Thread Omri
Hi Derek, thanks! the as_dict method has already been fixed in trunk to handle my use-case. best wishes, Omri On Sat, Aug 11, 2012 at 12:26 AM, Derek sp1d...@gmail.com wrote: You could monkey patch it in 0.py in models, perhaps. On Thursday, July 26, 2012 1:10:43 AM UTC-7, Omri Har-Shemesh

[web2py] Re: Add dict to SERIALIZABLE_TYPES in Row object's as_dict method

2012-07-30 Thread Omri Har-Shemesh
It seems to have been already done by Anthony, thanks for the quick fix! :) Omri On Friday, July 27, 2012 4:33:34 PM UTC+2, Massimo Di Pierro wrote: Send me a patch and I will take a look. It is probably safe. On Friday, 27 July 2012 06:30:54 UTC-5, Omri Har-Shemesh wrote: I recently

[web2py] Add dict to SERIALIZABLE_TYPES in Row object's as_dict method

2012-07-27 Thread Omri Har-Shemesh
to simply add it to the list of values already defined there? Is there a different way of letting the Row object know how to decode the value? Is there a way to do it so that next time when I update web2py it will stay defined? Thanks! Omri --

Re: [web2py] Re: Suggestion - a pickled DAL field

2012-07-26 Thread Omri
: pickle.loads(x)) ) then I use db.define_table(my_table, Field(pickled_field, type=pickled) ) but when I fetch the record it does not go to as_dict() (actually I use as_list() but both don't work). Any suggestions? Is there a way to teach as_dict to interpret this field type? Best wishes, Omri

Re: [web2py] Re: Suggestion - a pickled DAL field

2012-07-26 Thread Omri
. Is there a different way (without changing the dal) to achieve this? Could you add it to the dal.py? Is it without risks? Thanks, Omri On Thu, Jul 26, 2012 at 9:46 AM, Omri omri...@gmail.com wrote: So I tried it out, and it works great, except for one thing - when I try to use record.as_dict() to get

[web2py] Re: Suggestion - a pickled DAL field

2012-07-25 Thread Omri Har-Shemesh
Thanks! I will try it out :) On Wednesday, July 25, 2012 3:55:39 AM UTC+2, Anthony wrote: On Tuesday, July 24, 2012 5:58:29 PM UTC-4, Derek wrote: Make it a computed field? I'm not sure that would be helpful in this case. A computed field computes its value automatically based on other

[web2py] Suggestion - a pickled DAL field

2012-07-24 Thread Omri Har-Shemesh
the field again. My suggestion is simple - create field that automatically pickles the values it gets and unpickles them on extraction. Is this already implemented? Do you have other suggestions on how to implement this so that I won't need to pickle every time I access the table? Best wishes, Omri --

[web2py] Re: Watching a table for changes

2012-06-12 Thread Omri Har-Shemesh
reasons not to do it? Since I use web2py mainly as a back-end to JSON-RPC calls and gateway to the database, my application is basically built out of a huge default controller and a huge model file. I don't think I would know where to put it otherwise. Best wishes, Omri On Monday, June 11, 2012

[web2py] Re: Watching a table for changes

2012-06-11 Thread Omri Har-Shemesh
using the and operator. Best wishes, Omri On Wednesday, June 6, 2012 3:44:46 PM UTC+2, Anthony wrote: In trunk, there are now triggers for DAL tables: self._before_insert = [] self._before_update = [lambda self,fs:self.delete_uploaded_files( fs)] self._before_delete

[web2py] Re: Watching a table for changes

2012-06-11 Thread Omri Har-Shemesh
and _after_delete? Best wishes, Omri On Monday, June 11, 2012 3:06:35 PM UTC+2, Omri Har-Shemesh wrote: Hi Anthony, thanks for the reply! I have been looking at the code and there is something I don't really understand (sorry for a noob question): when the functions get called

[web2py] Re: Watching a table for changes

2012-06-11 Thread Omri Har-Shemesh
fundamentally wrong? Should I add the function from the model file? Or at any other place? Thanks, Omri On Monday, June 11, 2012 5:33:53 PM UTC+2, Anthony wrote: I tried adding a method using: def SomeMethod(fields,res): print inside SomeMethod db.my_table._after_insert.append(SomeMethod

[web2py] Watching a table for changes

2012-06-06 Thread Omri Har-Shemesh
is that the data is quite complex and is inferred from several tables. Therefore, in order to save processing time, I want to calculate this data and return it only when I know it has changed. Thanks, Omri

[web2py] db.table.insert() inserts a field with id=None but returns an id number

2012-05-09 Thread Omri Har-Shemesh
Hi, I suddenly came across a weird bug, where when I add a record to a specific table (it doesn't happen with other tables), it inserts the record with the id field == null, but returns a number as if it is the id. Furthermore, the number returned is close to (but not exactly) the number of

[web2py] Re: db.table.insert() inserts a field with id=None but returns an id number

2012-05-09 Thread Omri Har-Shemesh
web2py happy again? I'm guessing that now the table's definition as it really is, is different from what web2py expects. Any help would be greatly appreciated! Omri On Wednesday, May 9, 2012 11:14:57 AM UTC+2, Omri Har-Shemesh wrote: Hi, I suddenly came across a weird bug, where when I add

[web2py] Re: db.table.insert() inserts a field with id=None but returns an id number

2012-05-09 Thread Omri Har-Shemesh
Sorry for the frequent e-mails. I just solved the problem - I forgot to set the type of the ID field to INTEGER PRIMARY KEY AUTOINCREMENT, since Sqliteman does not show it as an option. Best, Omri On Wednesday, May 9, 2012 12:15:31 PM UTC+2, Omri Har-Shemesh wrote: Additional information

[web2py] Sharing application across development machines - what files to synchronize from databases directory

2012-03-30 Thread Omri Har-Shemesh
from the databases directory? And a different question which occurred to me - is there a way to tell web2py to clear the database before deployment, or should I simply delete everything from the 'databases' directory and let it rebuild the tables? Thanks, Omri

[web2py] Re: Using regular expressions in DAL queries

2012-02-24 Thread Omri Har-Shemesh
: http://trentrichardson.com/2008/10/23/exploring-various-sql-regex-syntax/ All in all, seems that most systems support some version of POSIX standard, except when you need to extend the SQL with a user defined function, then I guess you can chose the implementation you want. Hope this help, Omri

[web2py] Re: Using regular expressions in DAL queries

2012-02-24 Thread Omri Har-Shemesh
Hi Massimo, I already opened an issuehttp://code.google.com/p/web2py/issues/detail?id=678at Google code, its link is in my second e-mail in this discussion. I will add there a link to this discussion. Best, Omri

[web2py] Using regular expressions in DAL queries

2012-02-23 Thread Omri Har-Shemesh
updates of the framework, and I don't want it in a future version to be overwritten. Thanks! Omri

[web2py] Re: Using regular expressions in DAL queries

2012-02-23 Thread Omri Har-Shemesh
I opened an issue: http://code.google.com/p/web2py/issues/detail?id=678 Thanks for finding out how this should be done, I don't mind helping nagging about it ;-) Best, Omri

[web2py] Re: regexp in like expressions

2012-02-22 Thread Omri Har-Shemesh
but didn't find any mention of this in the DAL chapter. Cheers, Omri

[web2py] (Very) small improvement suggestion

2011-12-12 Thread Omri Har-Shemesh
change necessary is in the gluon.widget, around line 214 one has to add: self.port_number.bind('Return', lambda e: self.start()) and maybe around line 202 the same for the ip field. Thanks, Omri

[web2py] importing gluon to a module in the modules directory

2011-04-21 Thread Omri Har-Shemesh
try to import only web2py.gluon.dal. I'm running on Ubuntu 10.10 with web2py version 1.94.6. Thanks, Omri

[web2py] Re: importing gluon to a module in the modules directory

2011-04-21 Thread Omri Har-Shemesh
This is stable - I only use the stable version and frequently update using the Update link.

[web2py] Re: importing gluon to a module in the modules directory

2011-04-21 Thread Omri Har-Shemesh
changed exactly. Thanks anyway for the help, Omri

[web2py] Re: datetime, DAL and JSON serialization

2011-04-08 Thread Omri Har-Shemesh
attribute. Any help would be greatly appreciated, and thanks for the extremely good work on web2py (it seems I keep saying it, but it is really and truly appreciated!) Omri

[web2py] Re: datetime, DAL and JSON serialization

2011-04-01 Thread Omri Har-Shemesh
attribute. Any help would be greatly appreciated, and thanks for the extremely good work on web2py (it seems I keep saying it, but it is really and truly appreciated!) Omri

[web2py] Web2py uses the wrong database

2011-03-29 Thread Omri
with the web2py database administrator, only when I access the data through my application. For both applications I use the default db = DAL('sqlite:// storage.sqlite'). I am accessing the server through JSONRPC (using qooxdoo). Any suggestions? Thanks, Omri

[web2py] Re: Web2py uses the wrong database

2011-03-29 Thread Omri
I have found my problem - it was some stupid configuration problem. But I will still want to leave the question open - What is the best way to create a new 'clean' copy of the database file, resetting all the auto-increment fields? Thanks, Omri On Tue, Mar 29, 2011 at 11:36, Omri omri

[web2py] Re: Web2py uses the wrong database

2011-03-29 Thread Omri Har-Shemesh
Thanks for your quick reply! Omri

[web2py] datetime, DAL and JSON serialization

2011-03-29 Thread Omri Har-Shemesh
that the DAL returns a datetime object which is not JSON-serializable. Has anything changed recently with the DAL? I don't think I have changed any configuration properties on my database - but could this be a reason for it suddenly stop working? Thanks for the time and great work on web2py! Omri

Re: [web2py] Re: UnicodeDecodeError: 'ascii' codec can't decode byte ...

2010-11-10 Thread Omri
, Nov 9, 2010 at 21:01, mdipierro mdipie...@cs.depaul.edu wrote: As a debug check. I'd like to see what you gate if you print data before the update. Just in case what you put it in it is not what you get. On Nov 9, 1:25 pm, Omri omri...@gmail.com wrote: in the qooxdoo application, I define

[web2py] Small suggestion regarding auth.add_membership

2010-11-10 Thread Omri
a part of the group? Thanks for the great work with web2py! I love it :) Omri

Re: [web2py] Re: UnicodeDecodeError: 'ascii' codec can't decode byte ...

2010-11-10 Thread Omri
: Viele Umlauts: äääüüüÜÜÜÖÖÖäää } On Wed, Nov 10, 2010 at 15:23, mdipierro mdipie...@cs.depaul.edu wrote: If you start web2py from the console you should see the output to the console. You can also print to a file or log the output if that makes it easier. On Nov 10, 5:47 am, Omri omri

[web2py] Re: UnicodeDecodeError: 'ascii' codec can't decode byte ...

2010-11-09 Thread Omri
for .update what fields I'm updating. Thanks, Omri On Nov 8, 5:19 pm, mdipierro mdipie...@cs.depaul.edu wrote: Can you try put a u in front of the string u... On Nov 8, 5:30 am, Omri omri...@gmail.com wrote: Hello, I'm having a unicode problem with the DAL. I'm developing a (mainly) RPC

Re: [web2py] Re: UnicodeDecodeError: 'ascii' codec can't decode byte ...

2010-11-09 Thread Omri
? On Nov 9, 12:20 pm, Omri omri...@gmail.com wrote: I did some tryouts and it seems that the only problem is with the update method, and then only when called through service.jsonrpc. I created the following model: db.define_table(debug_stuff, Field(name, length=100

[web2py] UnicodeDecodeError: 'ascii' codec can't decode byte ...

2010-11-08 Thread Omri
use the syntax of .insert(name = value, name2 = value2,...). I tried to encode all the data keys which are unicode objects without success, it keeps raising the same error. Am I missing something here, or is this a bug? And more interestingly, how can it be solved? Thanks, Omri

[web2py] JSON-RPC best practices

2010-10-22 Thread Omri
are welcome :) Cheers, Omri

[web2py] Re: 'DEMO_MODE' is not defined

2010-10-13 Thread Omri
in demo mode') redirect(URL('default','site')) except: pass hope this helps, Omri On Oct 13, 11:50 am, DenesL denes1...@yahoo.ca wrote: Same problem here. Create new app, click on database administration link, error. On Oct 13, 2:43 am, Joe J joe.jasin...@gmail.com wrote: Hi

[web2py] Embedding the web2py code editor in my application

2010-10-11 Thread Omri
execute them in a predefined python environment. Thanks! Omri Har-Shemesh

[web2py] Validators with Dependencies

2010-09-17 Thread Omri
, Omri Har-Shemesh