[web2py:14046] Re: MSSQL in web2py

2008-12-23 Thread Massimo Di Pierro
Thanks to some private communication from Ondrej, we have a better unicode support in MSSQL. Because this breaks backward compatibility, we decided, for now to create a new URI: SQLDB('mssql2://') it works like SQLDB('mssql://...') but 1) BIT is replaced by CHAR(1) to uniform to other data

[web2py:14047] Re: Database Synchronization revisited

2008-12-23 Thread mdipierro
The problem is that 1) we cannot break backward compatibility, 2) making id a uuid is not sufficient because you also need to timestamp records, 3) there is a value in having simple ids. I think one can do what you need with the current setup. I will build an example and post it shortly on a new

[web2py:14048] Database Synchronization Howto and UUID

2008-12-23 Thread mdipierro
Consider the following example: db=SQLDB('sqlite:memory:') db.define_table('person', db.Field('name')) db.define_table('dog', db.Field('owner',db.person), db.Field('name')) db.dog.owner.requires=IS_IN_DB(db

[web2py:14049] Re: Database Synchronization revisited

2008-12-23 Thread seeker
"1) we cannot break backward compatibility" - Would it break backward compatibility if the default type remains as integer? Only in required cases would the type be set as uuid. "2) making id a uuid is not sufficient because you also need to timestamp records" - Sorry, don't understand why that

[web2py:14050] Re: Database Synchronization revisited

2008-12-23 Thread mdipierro
On Dec 23, 3:58 am, seeker wrote: > "1) we cannot break backward compatibility" > - Would it break backward compatibility if the default type remains as > integer? Only in required cases would the type be set as uuid. in theory. but in practice you cannot have an integer long enough to guarante

[web2py:14051] Re: Database Synchronization Howto and UUID

2008-12-23 Thread seeker
Thanks Massimo. Great/useful example (for certain use cases). Your example, at last, made me realize that we have made (I think...) slightly different assumptions in the discussion of this issue thus far: In my case I am simply trying to aggregate multiple child databases into one parent databa

[web2py:14054] MERRY CHRISTMAS ALL!

2008-12-23 Thread voltron
I wish you all a merry christmas! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email t

[web2py:14052] Re: Performance revisited

2008-12-23 Thread voltron
Thanks Yarko, I will study that On Dec 22, 12:58 pm, "Yarko Tymciurak" wrote: > might this be useful?http://mg.pov.lt/profilehooks/ > > On Mon, Dec 22, 2008 at 10:58 AM, voltron wrote: > > > Thanks Vince, do you have a better detailed timing solution? Sorry for > > being such a newbie on stress

[web2py:14053] Re: Database Synchronization Howto and UUID

2008-12-23 Thread mdipierro
Then you do not need uuids at all. You can just db(query).select().export_to_csv_file(...) the records you want to export and db.table.import_from_csv_file(...) to import them back. There is a recent thread on how import_from_sv_file handles and fixes references. Massimo On Dec 23, 4:19 am, se

[web2py:14055] Re: Database Synchronization Howto and UUID

2008-12-23 Thread seeker
Had a look at the csv import thread. Excellent! Thanks for the help. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com To uns

[web2py:14056] Re: MERRY CHRISTMAS ALL!

2008-12-23 Thread mdipierro
I second! On Dec 23, 4:36 am, voltron wrote: > I wish you all a merry christmas! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups

[web2py:14057] Re: Database Synchronization Howto and UUID

2008-12-23 Thread seeker
Next question: How can this be done via direct database read/write as opposed to export/import of csv files? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send

[web2py:14058] Re: Database Synchronization Howto and UUID

2008-12-23 Thread mdipierro
Sorry. I do not understand the question. Massimo On Dec 23, 5:16 am, seeker wrote: > Next question: > > How can this be done via direct database read/write as opposed to > export/import of csv files? --~--~-~--~~~---~--~~ You received this message because you are

[web2py:14059] Re: Database Synchronization Howto and UUID

2008-12-23 Thread seeker
If I open both parent and child (x?) databases in a w2p application and I wish to transfer data from the child db's to the parent db by reading data from the child db's and then writing the data to the parent db (i.e. not via a csv file export/import as you describe above, but direct 'insert ...')

[web2py:14060] Re: Database Synchronization Howto and UUID

2008-12-23 Thread seeker
or would data transfer of this nature always have to happen via file export import as oppose to direct database access? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this gro

[web2py:14061] Re: Performance tips

2008-12-23 Thread Jonathan Benn
On Dec 23, 10:54 am, mdipierro wrote: > oh! You didn't say this was about GAE. I'm sorry for not being specific--I didn't realize that there was such a big difference between SQLDB and GQLDB. But it's ok, I have a solution in place for profiling the database. I just think that it would be very

[web2py:14062] Re: Performance tips

2008-12-23 Thread mdipierro
in latest trunk, _lastsql on GAE is a string but only says "select" , "delete", "insert" etc. Better than nothing for now. Massimo On Dec 23, 12:14 am, Jonathan Benn wrote: > Hi all, > > On Dec 22, 12:43 pm, mdipierro wrote: > > > db=SQLDB(...) > > def timer(db,f): > > import time,os > >

[web2py:14063] Re: Database Synchronization Howto and UUID

2008-12-23 Thread Fran
On Dec 23, 9:45 am, mdipierro wrote: > This can be achieved without modifying web2py. Here is what to do: *Many* thanks for such a clear HOWTO :) > db.Field('owner',length=64), > db.dog.owner.requires=IS_IN_DB(db,'person.uuid','%(name)s') Does replacing the Field definition's db.person wit

[web2py:14064] Re: Database Synchronization Howto and UUID

2008-12-23 Thread mdipierro
You are right. In the example it is the framework that knows about relations, not the db. This will change when/if we will also referencing fields other than id. Massimo On Dec 23, 7:42 am, Fran wrote: > On Dec 23, 9:45 am, mdipierro wrote: > > > This can be achieved without modifying web2py.

[web2py:14065] Re: Database Synchronization Howto and UUID

2008-12-23 Thread mdipierro
P.S. you can set migrate=False and create the table manually so that dog references person(uuid). Massimo On Dec 23, 8:33 am, mdipierro wrote: > You are right. In the example it is the framework that knows about > relations, not the db. This will change when/if we will also > referencing fields

[web2py:14066] Re: MERRY CHRISTMAS ALL!

2008-12-23 Thread DenesL
... and a prosperous 2009 !!! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to w

[web2py:14067] Re: Performance tips

2008-12-23 Thread vince
i am still seeking the way to log all sql query for SQLDB. the following error still have error. i tried to look into sql.py but really have no quick solution myself. the way jonathan use to wrap the whole db class seems working except when using cache. def timer(db,f): import time,os

[web2py:14068] Re: MERRY CHRISTMAS ALL!

2008-12-23 Thread Timothy Farrell
+1 DenesL wrote: ... and a prosperous 2009 !!! -- Timothy Farrell Computer Guy Statewide General Insurance Agency (www.swgen.com) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework"

[web2py:14069] Re: MERRY CHRISTMAS ALL!

2008-12-23 Thread Wes James
On Tue, Dec 23, 2008 at 3:36 AM, voltron wrote: > > I wish you all a merry christmas! Merry Christmas... in your language: http://www.santas.net/howmerrychristmasissaid.htm :) -wj --~--~-~--~~~---~--~~ You received this message because you are subscribed to th

[web2py:14070] Re: Database Synchronization Howto and UUID

2008-12-23 Thread Fran
On Dec 23, 2:34 pm, mdipierro wrote: > P.S. you can set migrate=False and create the table manually so that > dog references person(uuid). ok, a useful trick...although this then breaks database portability. Another limitation is that the uuid field is visible within t2.create () formsbeing

[web2py:14071] Re: Pyjamas + web2py + twisted vs Django + Pinax

2008-12-23 Thread don
Massimo: Why do you prefer pyAMF + Flash to pyjamas? Thx. Don. On Dec 19, 12:48 pm, mdipierro wrote: > > If your game runs in the browser you are much better off using Flash > (pyAMF)+web2py, else use Pygame+twisted. > --~--~-~--~~~---~--~~ You received this

[web2py:14072] Re: MERRY CHRISTMAS ALL!

2008-12-23 Thread Yarko Tymciurak
Whether you celebrate Christmas or not, I wish you all - Peace on Earth, and Goodwill amongst People... Thanks for the sense of community we experience here. Warm regards, and Happy New Year! Yarko On Tue, Dec 23, 2008 at 9:53 AM, Wes James wrote: > > On Tue, Dec 23, 2008 at 3:36 AM, voltron

[web2py:14073] Re: Database Synchronization Howto and UUID

2008-12-23 Thread mdipierro
with db.table.exposed=[] you can set a list of fields that you want visible in T2.create/update Massimo On Dec 23, 10:11 am, Fran wrote: > On Dec 23, 2:34 pm, mdipierro wrote: > > > P.S. you can set migrate=False and create the table manually so that > > dog references person(uuid). > >

[web2py:14074] Multiple Applications using 1 template

2008-12-23 Thread mike
Whats the best practice in having multiple applications using same layout template. since we are one the subject, is there a possibility of having one application use functions from other applications. If so whats the best practice in doing so? --~--~-~--~~~---~--~---

[web2py:14075] reportlab in web2py?

2008-12-23 Thread mdipierro
Should we include reportlab in web2py? pros: web2py lacks printing capability and pdf output may be a solution the license allows it cons: it doubles the size of web2py there are alternative such as the openoffice APIs it requires creating a site-package folder and add it the path Comments? Ma

[web2py:14076] Re: Pyjamas + web2py + twisted vs Django + Pinax

2008-12-23 Thread mdipierro
For a game flash seems more appropriate than javascript. I have seen many excellent flash games, not many decent javascript games. I may be mistaken. I have nothing against pyjamas with is an excellent system and I hope in further integration with web2py. Massimo On Dec 23, 10:20 am, don wrot

[web2py:14077] Re: Multiple Applications using 1 template

2008-12-23 Thread mdipierro
you can {{extend '../../otherapp/views/layout.html'}} but I suggest copying the layout else the apps will not be portable. Massimo On Dec 23, 12:41 pm, mike wrote: > Whats the best practice in having multiple applications using same > layout template. > > since we are one the subject, is ther

[web2py:14078] limitby with mssql - can this be added to the DAL?

2008-12-23 Thread Mike
Hi Everyone, As the books notes, limitby isn't fully supported by mssql since the TOP command always starts at index 0. So to implement paging I ended up writing my own SQL to mimic the limitby behavior. The main example I used was from http://www.15seconds.com/issue/070628.htm and requires SQL

[web2py:14079] Re: Multiple Applications using 1 template

2008-12-23 Thread mike
What about reusing functions from other applications. On Dec 23, 2:06 pm, mdipierro wrote: > you can > > {{extend '../../otherapp/views/layout.html'}} > > but I suggest copying the layout else the apps will not be portable. > > Massimo > > On Dec 23, 12:41 pm, mike wrote: > > > Whats the best

[web2py:14080] Re: Pyjamas + web2py + twisted vs Django + Pinax

2008-12-23 Thread Yarko Tymciurak
On Tue, Dec 23, 2008 at 12:45 PM, mdipierro wrote: > > For a game flash seems more appropriate than javascript. I have seen > many excellent flash games, not many decent javascript games. > I may be mistaken. Flash is richer which is why a lot of mobile phones are going to a flash-based ui;

[web2py:14081] Dictionary question

2008-12-23 Thread mike
I am using T3, in my setting page I have this var defined: response.topMenu = [dict(test1='test11', test2='test22')] In my layout.html template I want to use this, this is what I have: {{for link in response.topMenu:}} {{=link.test1}} {{pass}} I get this error: AttributeError: 'dict'

[web2py:14082] Re: reportlab in web2py?

2008-12-23 Thread mr.freeze
It would be nice to have a feature system that allows either manual uploading (similar to the application upload) or on-demand downloading of components like ReportLab so that each person could customize their installation as they see fit. Just daydreaming out loud. It would probably be difficul

[web2py:14083] How to link CAS user id's with records from other DB.

2008-12-23 Thread Alex
Hello! I'm writing application which just set of memos for users, how can I be sure what user see/edit only his personal messages? Considering table structure like this dba.define_table('services', SQLField('memo'), SQLField('remind_interval'), SQL

[web2py:14084] Re: Dictionary question

2008-12-23 Thread Wes James
On Tue, Dec 23, 2008 at 12:44 PM, mike wrote: > > I am using T3, in my setting page I have this var defined: > > response.topMenu = [dict(test1='test11', test2='test22')] > > In my layout.html template I want to use this, this is what I have: > > {{for link in response.topMenu:}} >{{=link

[web2py:14085] Re: How to link CAS user id's with records from other DB.

2008-12-23 Thread Wes James
On Tue, Dec 23, 2008 at 1:04 PM, Alex wrote: > > Hello! > > I'm writing application which just set of memos for users, how can I > be sure what user see/edit only his personal messages? > > Considering table structure like this > dba.define_table('services', >SQLField('memo'), >

[web2py:14086] Re: Dictionary question

2008-12-23 Thread mike
Thanks for the reply, but just to make it more difficult, what if I have an array of dict objects. ex. [dict(test1='test11', test2='test22') ,dict(test1='test11', test2='test22') ,dict(test1='test11', test2='test22') ,dict (test1='test11', test2='test22') ] how to I loop through it. On Dec 23

[web2py:14087] Re: reportlab in web2py?

2008-12-23 Thread DenesL
> Components like these are very useful but probably shouldn't be > included in the framework by default in my opinion. +1 Even if the package required some specific interface, the package itself should not be a part of web2py. Examples, how-tos, wiki entries, etc. on the other hand would be wel

[web2py:14088] Re: Dictionary question

2008-12-23 Thread Wes James
On Tue, Dec 23, 2008 at 1:32 PM, mike wrote: > > Thanks for the reply, but just to make it more difficult, what if I > have an array of dict objects. > > ex. [dict(test1='test11', test2='test22') ,dict(test1='test11', > test2='test22') ,dict(test1='test11', test2='test22') ,dict > (test1='test11'

[web2py:14089] Re: reportlab in web2py?

2008-12-23 Thread Timothy Farrell
-1 It's too heavy.  Also, reportlab is a fairly low-level API.  Unless you're going to write a higher-level abstraction layer, it wouldn't "fit" in web2py.  Plus, most people will want to take advantage of the speedups (which can't be included in the source version of web2py). Pisa fits the

[web2py:14090] User Login Through GAE in T3

2008-12-23 Thread mike
Is there anyone who tried this. This is what I will be trying to do: Have a new module GAEIdentity and just wrap around the login/out gae api into it. Then use it to modify these vars, to that it works with T2/3 session.t2.person_id session.t2.person_name session.t2.person_email

[web2py:14091] Re: IMPORTANT: Bill's patch

2008-12-23 Thread Peter
This looks like what I need: custom forms with fields that can tie into model and database, including validation,etc. But this modified version of "Bill's patch" hasn't yet made it into production yet (1.54), is that correct? -Peter On Nov 10, 8:01 am, mdipierro wrote: > Attention!!! I posted

[web2py:14092] Re: reportlab in web2py?

2008-12-23 Thread Timothy Farrell
easy_install reportlab dang, that's easy! ;-) mr.freeze wrote: It would be nice to have a feature system that allows either manual uploading (similar to the application upload) or on-demand downloading of components like ReportLab so that each person could customize their installation as

[web2py:14093] Re: IMPORTANT: Bill's patch

2008-12-23 Thread Peter
Sorry, please ignore. It seems I missed the new thread on this: http://groups.google.com/group/web2py/browse_thread/thread/4cd0a75de54f32aa/2c20dbcbd9d8aa9d?lnk=gst&q=custom+forms#2c20dbcbd9d8aa9d Cheers, -P On Dec 23, 10:55 pm, Peter wrote: > This looks like what I need:customformswith fields

[web2py:14094] Re: limitby with mssql - can this be added to the DAL?

2008-12-23 Thread mdipierro
I think so. This is what we do with Oracle. Tomorrow. Thank you for the example. It helps. Massimo On Dec 23, 1:26 pm, Mike wrote: > Hi Everyone, > > As the books notes, limitby isn't fully supported by mssql since the > TOP command always starts at index 0. > > So to implement paging I ended u

[web2py:14095] Re: Multiple Applications using 1 template

2008-12-23 Thread mdipierro
you have various options. You can define functions in modules and import the modules. You can use the function exec_environment. This is discussed in various threads on this list. Massimo On Dec 23, 1:40 pm, mike wrote: > What about reusing functions from other applications. > > On Dec 23, 2:0

[web2py:14096] Re: reportlab in web2py?

2008-12-23 Thread mdipierro
is it possible to call easy_install programmatically? Can anybody point me to an example? Massimo On Dec 23, 4:21 pm, Timothy Farrell wrote: > easy_install reportlab > dang, that's easy! > ;-) > mr.freeze wrote:It would be nice to have a feature system that allows either > manual uploading (si

[web2py:14097] Re: Dictionary question

2008-12-23 Thread mike
Wouldn't {{=item[link]}} be the same as {{=link.test1}} or {{=link[test1]}} as in this example response.topMenu = [dict(test1='test11', test2='test22')] {{for link in response.topMenu:}} {{=link.test1}} or {{=link[test1]}} {{pass}} On Dec 23, 3:40 pm, "Wes James" wrote: > On Tue,

[web2py:14098] Re: Dictionary question

2008-12-23 Thread Wes James
doing {{=link.test1}} will work, but using it like that in a loop doesn't make sense to me. You'd need to know the key name every time so you wouldn't need the loop, you'd just type all the menu items out. The way I showed you, the key in the key,value pair doesn't need to be known. Depends on