[web2py] Validators with Dependencies

2010-09-17 Thread Omri
book and the group but was unable to find a way to do so. Thanks, Omri Har-Shemesh

[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] Re: 'DEMO_MODE' is not defined

2010-10-13 Thread Omri
isabled in demo mode') redirect(URL('default','site')) except: pass hope this helps, Omri On Oct 13, 11:50 am, DenesL wrote: > Same problem here. > Create new app, click on "database administration" link, error. > > On Oct 13, 2:43 am, Joe

[web2py] JSON-RPC best practices

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

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

2010-11-08 Thread Omri
to insert records to the database with Umlauts, but I use a different method for the insert. I 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] Re: "UnicodeDecodeError: 'ascii' codec can't decode byte ...

2010-11-09 Thread Omri
here I tried to use the **data for the update method. The problem is that I want the method to be general, and therefore cannot use the method of the third line to specify for .update what fields I'm updating. Thanks, Omri On Nov 8, 5:19 pm, mdipierro wrote: > Can you try put a u in fro

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

2010-11-09 Thread Omri
data? > > On Nov 9, 12:20 pm, Omri 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_

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

2010-11-10 Thread Omri
works. On Tue, Nov 9, 2010 at 21:01, mdipierro 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 wrote: > > in the qooxdoo

[web2py] Small suggestion regarding auth.add_membership

2010-11-10 Thread Omri
ady 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
ata = { name : "Überprufen", textfield : "Viele Umlauts: äääüüüÜÜÜÖÖÖäää" } On Wed, Nov 10, 2010 at 15:23, mdipierro 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 mak

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

2012-07-26 Thread Omri
ct to interpret this field type? Best wishes, Omri On Wed, Jul 25, 2012 at 9:20 PM, howesc wrote: > For what it is worth i have used custom fields for this type of thing with > great success! > > > On Tuesday, July 24, 2012 8:20:03 AM UTC-7, Anthony wrote: >> >> Yo

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

2012-07-26 Thread Omri
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 wrote: > So I tried it out, and it works great, except for one thing - when I try > to use record.as_dict() to get > the

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 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-S

[web2py] Web2py uses the wrong database

2011-03-29 Thread Omri
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, O

[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
atest). The question is: Can I change the value of "user_id" input after submission and before the process, so that it will include previous user_ids? Thanks! Omri. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source cod

[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] Re: Trying to use the LOAD helper, if a button is clicked

2014-06-19 Thread Omri Levy
ead, use the $.web2py.component() Javascript function. Something like: > > > > > > Anthony > > On Friday, June 13, 2014 7:47:34 PM UTC-4, Omri Levy wrote: >> >> Hi , >> >> So I have a ticket system, and I want to allow user to edit the ticket >> w

[web2py] Ticket in Appadmin when viewing a table

2014-06-19 Thread Omri Levy
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): File "G:\Dropbox\Coding Project

[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

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

2014-06-21 Thread Omri Levy
thub.com/web2py/web2py/archive/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 >> ref

[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: 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] 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 ne

[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 > > bes

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

2014-07-09 Thread Omri Levy
converted 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 - ht

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

2014-07-11 Thread Omri Levy
7;] > print mydict.a --> no exception > > > > > On Thursday, July 10, 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

[web2py] Suggestion - a pickled DAL field

2012-07-24 Thread Omri Har-Shemesh
e? Best wishes, Omri --

[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

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

2012-07-27 Thread Omri Har-Shemesh
as_dict method. Is it safe 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 --

[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 wr

[web2py] Speeding up the admin interface

2012-08-24 Thread Omri Har-Shemesh
one minified js 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 --

[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 reco

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

2012-05-09 Thread Omri Har-Shemesh
about this. Is there a way to make 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, &

[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 infor

[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] Re: Watching a table for changes

2012-06-11 Thread Omri Har-Shemesh
t] without 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_fil

[web2py] Re: Watching a table for changes

2012-06-11 Thread Omri Har-Shemesh
update 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): >

[web2py] Re: Watching a table for changes

2012-06-11 Thread Omri Har-Shemesh
ng? 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_ta

[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,

[web2py] (Very) small improvement suggestion

2011-12-12 Thread Omri Har-Shemesh
nly change necessary is in the gluon.widget, around line 214 one has to add: self.port_number.bind('', lambda e: self.start()) and maybe around line 202 the same for the ip field. Thanks, 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] Using regular expressions in DAL queries

2012-02-23 Thread Omri Har-Shemesh
t the automatic 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: Using regular expressions in DAL queries

2012-02-24 Thread Omri Har-Shemesh
tion 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 issue<http://code.google.com/p/web2py/issues/detail?id=678>at 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] Sharing application across development machines - what files to synchronize from databases directory

2012-03-30 Thread Omri Har-Shemesh
to the repository all the files 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: 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
t 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

[web2py] Re: datetime, DAL and JSON serialization

2011-04-01 Thread Omri Har-Shemesh
ndreas'} 2 {'at': datetime.datetime(2010, 11, 10, 12, 20, 20), 'by': 'Andreas'} I think it might be related to the detect_types change nick name has hinted at. Am i right? I have tried to look through the Service class source to understand if it uses as_list or not, but I haven't been able to ascertain when a function receives the as_list 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-08 Thread Omri Har-Shemesh
ndreas'} 2 {'at': datetime.datetime(2010, 11, 10, 12, 20, 20), 'by': 'Andreas'} I think it might be related to the detect_types change nick name has hinted at. Am i right? I have tried to look through the Service class source to understand if it uses as_list or not, but I haven't been able to ascertain when a function receives the as_list 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] importing gluon to a module in the modules directory

2011-04-21 Thread Omri Har-Shemesh
ication. It does the same when I 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
sure what changed exactly. Thanks anyway for the help, Omri