Re: Schema evolution

2006-05-29 Thread Jeroen Ruigrok van der Werven
Brant, On 4/24/06, Brant Harris <[EMAIL PROTECTED]> wrote: > I've created a proposal for working all of the Schema Evolution tidbits out: > http://code.djangoproject.com/wiki/SchemaEvolutionProposal > > If you get a chance to read and comment, I'd appreciate. I noticed in the code that you have a

Re: .delete() a little too eager?

2006-05-29 Thread Jeff Forcier
I found this a few months ago and created a patch for it: http://code.djangoproject.com/ticket/1007 I'm not at all sure that it will patch correctly against anything recent, but it should be pretty obvious what I did, so you should be able to tweak it for whatever version you have checked ou

Ticket review please? 1584

2006-05-29 Thread Jeroen Ruigrok van der Werven
Could someone a little more intimate with the source code please review the follow ticket: http://code.djangoproject.com/ticket/1584 Also see the discussion on django-users about this. Thanks, -- Jeroen Ruigrok van der Werven --~--~-~--~~~---~--~~ You received

Re: Schema evolution

2006-05-29 Thread Derek Anderson
jeroen, brant, ilias, etc: schema evolution was an idea suggested and specifically granted for the SoC project. i don't know who here was involved with ranking the proposals, but for better or worse mine was accepted. to a certain extent i expect this to come with a effort not to trivialize my

Re: Schema evolution

2006-05-29 Thread Todd O'Bryan
On May 29, 2006, at 11:09 AM, Derek Anderson wrote: > schema evolution was an idea suggested and specifically granted for > the > SoC project. i don't know who here was involved with ranking the > proposals, but for better or worse mine was accepted. And I for one am very excited. Do you hav

Re: Schema evolution

2006-05-29 Thread Jeroen Ruigrok van der Werven
On 5/29/06, Derek Anderson <[EMAIL PROTECTED]> wrote: > schema evolution was an idea suggested and specifically granted for the > SoC project. i don't know who here was involved with ranking the > proposals, but for better or worse mine was accepted. to a certain > extent i expect this to come wi

Re: unicode.. reject?

2006-05-29 Thread gabor
Jeroen Ruigrok van der Werven wrote: > On 5/28/06, gabor <[EMAIL PROTECTED]> wrote: >> further debugging showed, that psycopg is at fault, because it quotes >> byte-string params, but not unicode-string params. >> >> also, take an unicode string, like u"gábor" (my name :-). you can assign >> it in

Re: Schema evolution

2006-05-29 Thread Derek Anderson
proposal is here: https://kered.org/blog/2006/05/24/summer-of-code/ it's more of a bit on a previous/related effort i did than a specific plan for django. i'm new to this project, and just starting my way through your all's modeling framework. more will be coming. jeroen: not miffed.

Re: unicode.. reject?

2006-05-29 Thread Jeroen Ruigrok van der Werven
On 5/29/06, gabor <[EMAIL PROTECTED]> wrote: > it works fine in all the cases... At least that's good news. I just wonder if it means that psycopg is a dead-end for dealing with Unicode and psycopg2 should be the preferred choice. I will try to see what I can dig up. -- Jeroen Ruigrok van der We

Re: Schema evolution

2006-05-29 Thread Jeroen Ruigrok van der Werven
On 5/29/06, Derek Anderson <[EMAIL PROTECTED]> wrote: > proposal is here: > https://kered.org/blog/2006/05/24/summer-of-code/ I will check it out later this week. > it's more of a bit on a previous/related effort i did than a specific > plan for django. i'm new to this project, and just

Re: unicode.. reject?

2006-05-29 Thread gabor
Jeroen Ruigrok van der Werven wrote: > On 5/29/06, gabor <[EMAIL PROTECTED]> wrote: >> it works fine in all the cases... > > At least that's good news. I just wonder if it means that psycopg is a > dead-end for dealing with Unicode and psycopg2 should be the preferred > choice. I will try to see

Re: unicode.. reject?

2006-05-29 Thread Jeroen Ruigrok van der Werven
On 5/29/06, gabor <[EMAIL PROTECTED]> wrote: > hmm, it depends on what do you call "unicode" :) Not just UTF-8. ;) > for example,if you keep EVERYTHING in utf-8 encoded bytestrings, > and: > - generate utf-8 webpages > - set up the database to store data in utf-8, > > then you can easily store-an

Re: Schema evolution

2006-05-29 Thread Ilias Lazaridis
Derek Anderson wrote: > jeroen, brant, ilias, etc: > > schema evolution was an idea suggested and specifically granted for the > SoC project. i don't know who here was involved with ranking the > proposals, but for better or worse mine was accepted. to a certain > extent i expect this to come w

Re: Ticket review please? 1584

2006-05-29 Thread Luke Plant
On Monday 29 May 2006 16:08, Jeroen Ruigrok van der Werven wrote: > Could someone a little more intimate with the source code please > review the follow ticket: > > http://code.djangoproject.com/ticket/1584 In case you didn't notice, this is now done. Luke -- "The one day you'd sell your soul

Re: Ticket review please? 1584

2006-05-29 Thread Jeroen Ruigrok van der Werven
On 5/29/06, Luke Plant <[EMAIL PROTECTED]> wrote: > In case you didn't notice, this is now done. Thanks a lot Luke for handling it promptly, much appreciated. I'll test this in my case. -- Jeroen Ruigrok van der Werven --~--~-~--~~~---~--~~ You received this mess

Re: unicode.. reject?

2006-05-29 Thread gabor
Jeroen Ruigrok van der Werven wrote: > On 5/29/06, gabor <[EMAIL PROTECTED]> wrote:> >> but then, to have a nice unicode-integration in django, we'd >> need to convert EVERYTHING to unicode..httpRequest, httpResponse etc. >> (as at http://code.djangoproject.com/wiki/UnicodeInDjango). > > > As fa

Re: unicode.. reject?

2006-05-29 Thread Ivan Sagalaev
gabor wrote: >i'm also willing to help with this task... but..do i understand this >correctly, that it's agreed that django is going to switch to unicode? > > Being one of the proponent of the all-unicode way back when it was proposed I should say that the more I think of it the more I'm afra

Re: .delete() a little too eager?

2006-05-29 Thread [EMAIL PROTECTED]
Hm. It seems to me that this issue can be solved by enhancing the declarative model side of Django. The problem is that you can't really differentiate between "part/whole" relationships, and associations. You should be able to say that an object is a part of a different object. I believe you can u

OT: arbitrary precision decimals for Python?

2006-05-29 Thread Todd O'Bryan
Sorry for the OT post, but what do people use for arbitrary precision decimals in Python? I would think it's in the standard libraries somewhere, but I must be googling the wrong terms. Todd --~--~-~--~~~---~--~~ You received this message because you are subs

Custom manipulators

2006-05-29 Thread Luke Plant
Has anyone tried to use Django's manipulators and forms for the case where you only want a few fields to be editable, and the rest to keep the original values? If so, has anyone found a way of doing this that, to put it bluntly, doesn't suck? The cookbook has this: http://code.djangoproject.

Re: OT: arbitrary precision decimals for Python?

2006-05-29 Thread Nicola Larosa (tekNico)
> Sorry for the OT post, but what do people use for arbitrary > precision decimals in Python? > > I would think it's in the standard libraries somewhere, but I > must be googling the wrong terms. It's called... [drum roll] decimal! ;-) http://docs.python.org/lib/module-decimal.html -- Nicola

Re: OT: arbitrary precision decimals for Python?

2006-05-29 Thread Todd O'Bryan
D'oh. Thanks! (And that doesn't come up at all if you google the words "arbitrary" "precision" "Python", strangely.) Todd On May 29, 2006, at 6:21 PM, Nicola Larosa (tekNico) wrote: > >> Sorry for the OT post, but what do people use for arbitrary >> precision decimals in Python? >> >> I woul

Re: EVOLUTION - Add Field Schema Evolution Support

2006-05-29 Thread Ilias Lazaridis
Ilias Lazaridis wrote: > After reviewing the relevant source code base a little, I have started > with the implementation of the schema evolution skeleton (which will > contain a functional "Add Field" support). > > http://case.lazaridis.com/multi/wiki/DjangoSchemaEvolution > > With a very sma

Re: EVOLUTION - Add Field Schema Evolution Support

2006-05-29 Thread James Bennett
On 5/29/06, Ilias Lazaridis <[EMAIL PROTECTED]> wrote: > The "Add Field" functionality is nearly ready. You are aware that a full implementation of schema evolution for Django was accepted as a Google Summer of Code project, right? -- "May the forces of evil become confused on the way to your h

Re: EVOLUTION - Add Field Schema Evolution Support

2006-05-29 Thread Ilias Lazaridis
James Bennett wrote: > On 5/29/06, Ilias Lazaridis <[EMAIL PROTECTED]> wrote: >> The "Add Field" functionality is nearly ready. > > You are aware that a full implementation of schema evolution for > Django was accepted as a Google Summer of Code project, right? Yes, I am. http://case.lazaridis.

Re: EVOLUTION - Add Field Schema Evolution Support

2006-05-29 Thread DavidA
> I am wondering how to retrieve a collection of columns within a table, > whilst using the standard python dbapi2 functionality. Do you mean cursor.description? cursor = connection.cursor() cursor.execute('select * from blog_post where 1 = 0') for col in cursor.description: print col Each

Re: EVOLUTION - Add Field Schema Evolution Support

2006-05-29 Thread Ilias Lazaridis
DavidA wrote: >> I am wondering how to retrieve a collection of columns within a table, >> whilst using the standard python dbapi2 functionality. > > Do you mean cursor.description? > > cursor = connection.cursor() > cursor.execute('select * from blog_post where 1 = 0') > for col in cursor.descr

inserting aggregates in one transaction

2006-05-29 Thread shaunc
Hello, I tried using @transaction.commit_on_success to insert an object whose pieces are in (sub)tables. Conceptually, this should all be part of one transaction. However, django doesn't have the new id available, and so the operation fails (it tries to use "null" for the foreign key in the subt

Re: .delete() a little too eager?

2006-05-29 Thread shaunc
Ah - I just asked the group about a related issue: creating "wholes" in one transaction. Support for specification of part/whole relationships would be useful both for creati

Re: Custom manipulators

2006-05-29 Thread Ivan Sagalaev
Luke Plant wrote: >Has anyone tried to use Django's manipulators and forms for the case >where you only want a few fields to be editable, and the rest to keep >the original values? > I'm doing it very often. I have some frankenstein user model which is editable partly in one form, partly in an

Re: inserting aggregates in one transaction

2006-05-29 Thread Ian Holsman
Hi Shaun. I've done something similar to this using the dispatcher. in http://svn.zyons.python-hosting.com/trunk/zilbo/common/forum/ models.py (at the VERY bottom) I use the signals to update summary tables .. I'm using pre_save.. but you should be able to get what you need with the post_sav

RE: inserting aggregates in one transaction

2006-05-29 Thread Shaun Cutts
Ian, Thanks. Your code looks concise, but a bit mysterious (maybe it's the time of night). Is this a way to get extra events triggered in a db transaction, or is it just inside a single web request? As far as I can tell, you don't seem to be insisting on having one transaction; if you are, are y