[web2py:17864] SQLRows as dict?

2009-03-11 Thread rbuc
hello! i have a problem with SQLRows. i want to return some records as json but simplejson doesn't accept the SQLRows object. what i'm doing now is to convert the object to json, then load it with simplejson which makes it a dictionary and later the whole thing is encoded again as json.

[web2py:17865] Re: SQLRows as dict?

2009-03-11 Thread rbuc
sorry, the example should read: raise HTTP(200,simplejson.dumps({ 'date': '7-9-08', 'records': simplejson.loads(records.json()) })) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups web2py Web Framework group. To

[web2py:17866] Re: the need for an ID field

2009-03-11 Thread DenesL
Views, yes. A view class perhaps?. And viewforms! CRUD on multiple tables (join views). ...drooling... --~--~-~--~~~---~--~~ 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:17867] Re: SQLRows as dict?

2009-03-11 Thread carlo
I think there is no easy solution except serializing select responses the way you did. Simplejson has problems even to serialize date objects. carlo On 11 Mar, 13:55, rbuc thatvet...@gmail.com wrote: sorry, the example should read: raise HTTP(200,simplejson.dumps({ 'date': '7-9-08',

[web2py:17868] Re: firebird support not working?

2009-03-11 Thread Jose
On 10 mar, 19:21, Horst my.list.subscripti...@gmail.com wrote: See error traceback below - the same code, run through sqlite or postgres works just fine. However, during a transitional period, I have to use an already existing firebird database. Any idea how this error could be fixed? I

[web2py:17869] Re: MySql - Table can't be created when Migrate=False

2009-03-11 Thread Yannick
Massimo you said... It assumes the table exists and nothing needs to be done. So you mean that when we define the table for the very first time 'migrate' should always be set to 'True' then otherwise the table is not create... ???... I thought even with 'migrate' set to 'False' we were able to

[web2py:17872] Re: the need for an ID field

2009-03-11 Thread mdipierro
I like this suggestion. About Denes' question. There is a philosophical issue and a practical one. Should the record id be assigned by the DB or by the user? I think it should be assigned by the DB. The practical issue is that SQLFORM assumes the current record id. You change that and everything

[web2py:17873] Re: MySql - Table can't be created when Migrate=False

2009-03-11 Thread mdipierro
Exactly. migrate=False literally means trust me, the table is there! Massimo On Mar 11, 9:27 am, Yannick ytchatch...@gmail.com wrote: Massimo you said... It assumes the table exists and nothing needs to be done. So you mean that when we define the table for the very first time 'migrate'

[web2py:17874] tab separated csv file

2009-03-11 Thread Marco Prosperi
hello everybody, how can I change the following function (defined in appadmin.py controller) so that the downloaded file has tab separated values instead of comma separated? Or do I have to change some settings somewhere? thanks in advance, Marco def csv(): import gluon.contenttype

[web2py:17875] Returning A() from a Module

2009-03-11 Thread Michael Wales
I have the following function in a module - this function performs a Regex search and attempts to replace matches with a link (generated with the A() helper). The regex and replacement is working correctly - if I change the value of the replace variable to something other than the A() helper, it

[web2py:17876] Re: the need for an ID field

2009-03-11 Thread DenesL
On Mar 11, 9:56 am, mdipierro mdipie...@cs.depaul.edu wrote: Should the record id be assigned by the DB or by the user? I think it should be assigned by the DB. The practical issue is that SQLFORM assumes the current record id. You change that and everything break. It can be fixed but web2py

[web2py:17878] Entering Linked Data Too?

2009-03-11 Thread Kent Borg
Consider linked data: db.define_table('church', SQLField('name', requires=IS_NOT_EMPTY()) db.define_table('person', SQLField('name', requires=IS_NOT_EMPTY(), SQLField('church'), db.person) And the easy thing to do is then SQLFORM(db.person). Cool. OK, so what about when doing

[web2py:17879] Re: firebird support not working?

2009-03-11 Thread mdipierro
Do not do this. Use trunk and auth.settings.password_field='passwordf' On Mar 11, 8:48 am, Jose jjac...@gmail.com wrote: On 10 mar, 19:21, Horst my.list.subscripti...@gmail.com wrote: See error traceback below - the same code, run through sqlite or postgres works just fine. However,

[web2py:17880] Re: Entering Linked Data Too?

2009-03-11 Thread mdipierro
You need to create your own widget db.name.church.widget=select_or_create The widget make an ajax request to create. You can look the source code of existing widgets in gluon/sqlhtml.py On Mar 11, 10:34 am, Kent Borg kentb...@borg.org wrote: Consider linked data:   db.define_table('church',

[web2py:17882] Re: Returning A() from a Module

2009-03-11 Thread mdipierro
A(...) is an object not a string. You can convert it to string with A (...).xml() When an object is displayed {{=A(...)}} it is not scaped (but the strings within are). When a string is dispalyed {{=A(...).xml()}} it is escaped, unless marked up accordingly {{=XML(A(...).xml())}}. Hope this

[web2py:17883] Re: Returning A() from a Module

2009-03-11 Thread Michael Wales
Perfect! Thank you very much for the quick response, makes more sense now. On Mar 11, 12:18 pm, mdipierro mdipie...@cs.depaul.edu wrote: A(...) is an object not a string. You can convert it to string with A (...).xml() When an object is displayed {{=A(...)}} it is not scaped (but the

[web2py:17887] Re: Development/Production mode

2009-03-11 Thread Timothy Farrell
I don't know if this would be good or bad. We would have to be very careful to make sure that dev mode and production mode really behaved the same. The potential situation being, adding too much code to dev mode down the line could eventually make it behave differently than production mode.

[web2py:17888] Re: Development/Production mode

2009-03-11 Thread Fran
On Mar 11, 7:10 pm, blackthorne francisco@gmail.com wrote: As my experience with web2py grows I find an increased need to make it work in 2 main environments/behaviors. I do this already. But for me it's about whether my CSS/JS files are compressed/merged or discrete files. I don't think

[web2py:17889] Re: Development/Production mode

2009-03-11 Thread Timothy Farrell
I'm curious, what method you use for compressing/merging javascript files? Fran wrote: On Mar 11, 7:10 pm, blackthorne francisco@gmail.com wrote: As my experience with web2py grows I find an increased need to make it work in 2 main environments/behaviors. I do this already.

[web2py:17890] web2py -wiki

2009-03-11 Thread mdipierro
https://launchpad.net/web2py-wiki feel free to help improve it --~--~-~--~~~---~--~~ 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

[web2py:17892] Is SurveyCloud closed source?

2009-03-11 Thread Markus Gritsch
Hi, is the source code for SurveyCloud (http://web2py.appspot.com/survey/survey/index) freely available or is it closed source? Kind regards, Markus --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups web2py Web

[web2py:17893] Re: the need for an ID field

2009-03-11 Thread Yarko Tymciurak
in essence, web2py imposes a standard, consistent primary key for all web2py tables... This is not bad. I still argue (and the more I think of it, the more strongly) that this mapping for operating w/ legacy, existing databases should NOT be handled by web2py --- rather, the DB is the place to

[web2py:17899] Re: Is SurveyCloud closed source?

2009-03-11 Thread mdipierro
excellent point. But now I got a time-machine backup with RAID 2 ;-) On Mar 11, 4:01 pm, Markus Gritsch m.grit...@gmail.com wrote: On Wed, Mar 11, 2009 at 9:52 PM, mdipierro mdipie...@cs.depaul.edu wrote: https://launchpad.net/web2py-survey Nice, thank you -- just in case of another

[web2py:17900] Re: the need for an ID field

2009-03-11 Thread mdipierro
It should not be too difficult to support this in web2py What about the syntax: db.define_view('myview',db.Field('col1'),db.Field('col2'),select=db (...)._select()) and access it as a table db.myview as a normal table. A view would be a special table that does not have an id field and does

[web2py:17901] Re: Is SurveyCloud closed source?

2009-03-11 Thread Yarko Tymciurak
moving forward, you mean? or did you get backup from the past? I'm wondering about reddish is all... On Wed, Mar 11, 2009 at 5:07 PM, mdipierro mdipie...@cs.depaul.edu wrote: excellent point. But now I got a time-machine backup with RAID 2 ;-) On Mar 11, 4:01 pm, Markus Gritsch

[web2py:17902] Re: Is SurveyCloud closed source?

2009-03-11 Thread mdipierro
Only forward. Let me try fix reddish... On Mar 11, 5:52 pm, Yarko Tymciurak yark...@gmail.com wrote: moving forward, you mean?  or did you get backup from the past? I'm wondering about reddish  is all... On Wed, Mar 11, 2009 at 5:07 PM, mdipierro mdipie...@cs.depaul.edu wrote:

[web2py:17908] Re: Is SurveyCloud closed source?

2009-03-11 Thread mdipierro
Can you make a list of things that need to be fixed? Massimo On Mar 11, 6:20 pm, Yarko Tymciurak yark...@gmail.com wrote: Well - I was going to use it at work, so was going to fix but focusing on rietveld first so I won'd do anything until I either here from you, or we can

[web2py:17909] Re: the need for an ID field

2009-03-11 Thread Yarko Tymciurak
On Wed, Mar 11, 2009 at 9:04 PM, DenesL denes1...@yahoo.ca wrote: *snip* @Massimo What about the syntax: db.define_view('myview',db.Field('col1'),db.Field('col2'),select=db (...)._select()) My first idea is more along the lines of:

[web2py:17910] Re: Is SurveyCloud closed source?

2009-03-11 Thread Yarko Tymciurak
ok - but I won't until next week... On Wed, Mar 11, 2009 at 9:59 PM, mdipierro mdipie...@cs.depaul.edu wrote: Can you make a list of things that need to be fixed? Massimo On Mar 11, 6:20 pm, Yarko Tymciurak yark...@gmail.com wrote: Well - I was going to use it at work, so was going to

[web2py:17913] Re: the need for an ID field

2009-03-11 Thread aspersieman
mdipierro wrote: It should not be too difficult to support this in web2py What about the syntax: db.define_view('myview',db.Field('col1'),db.Field('col2'),select=db (...)._select()) and access it as a table db.myview as a normal table. A view would be a special table that does not

[web2py:17914] Re: Pycon 2009 - Important

2009-03-11 Thread Jorge Vargas
On Thu, Mar 12, 2009 at 12:20 AM, Yarko Tymciurak yark...@gmail.com wrote: We are working out details of what we'd like to propose to cover in the PyCon2009 web2py dojo, and it's looking pretty exciting. We will have some more announcements around this. Massimo will be starting us off, and