Re: DecimalField and 'decimal' module.

2007-07-23 Thread oggie rob
> "Curriculum" use psycopg1 or 2? > > seems like that was part of your point. > > Carl K Yeah I didn't mention this post that *now* Curriculum is using psycopg2 and Santa Cruz is using psycopg1, with no apparent problems (sorry, I did mention it earlier but forgot to clarify). But as Graham says,

Re: #3297 (newforms FileField/ImageField) - Feedback requested

2007-07-23 Thread Russell Keith-Magee
On 7/24/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > I tried some tricks to get this working as I think it should to keep > backwards compatibility for those with special file naming > requirements. > > Please give some feedback and tell me if i'm way off course. :) Hi Oyvind Apologies f

Re: #3297 (newforms FileField/ImageField) - Feedback requested

2007-07-23 Thread [EMAIL PROTECTED]
I tried some tricks to get this working as I think it should to keep backwards compatibility for those with special file naming requirements. Please give some feedback and tell me if i'm way off course. :) On Jul 16, 3:42 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Russel, any ideas on

Re: DecimalField and 'decimal' module.

2007-07-23 Thread Carl Karsten
oggie rob wrote: > - Application "Santa Cruz" built with 0.91 using psycopg1. Running > for just under a couple of years and accessed regularly. > - Application "Curriculum" built with trunk using psycopg1. Added > about 2 weeks ago & accessed infrequently. > Are you sure this would happen? If

Re: DecimalField and 'decimal' module.

2007-07-23 Thread Graham Dumpleton
On Jul 24, 12:15 pm, oggie rob <[EMAIL PROTECTED]> wrote: > > One problem that could arise is if, even in different sub interpreters, > > two Django instances separately tried to use version 1 and 2 of pyscopg. > > This is because the Python wrappers for one wouldn't match the loaded > > C extensi

Re: DecimalField and 'decimal' module.

2007-07-23 Thread oggie rob
> Hmmm, I'm not sure how psycopg1 in isolation could be a cause of > problems as it doesn't anywhere in its source code support the new > 'decimal.Decimal' type. Thus, the exact same problem as identified so > far with pyscopg2 couldn't be what was being encountered with > psycopg1. I'm sorry, I

Re: DecimalField and 'decimal' module.

2007-07-23 Thread Graham Dumpleton
On Jul 24, 12:26 am, oggie rob <[EMAIL PROTECTED]> wrote: > > > does this also affect psycopg1? > > > Looking at psycopg1 code, the answer would appear to be that it is not > > affected. Changes to support Decimal appear to be psycopg2 specific. > > > Graham > > The problems I was seeing the other

Re: choices being a QuerySet or callable

2007-07-23 Thread oggie rob
> I was wondering what everyone's stance is on inclusion of something like this. It is not really needed, you can override the field. Take a look at the __init__ call in http://www.djangosnippets.org/snippets/26/ and you can do that with a model field as well as a form field. Yes it is a bit of a

choices being a QuerySet or callable

2007-07-23 Thread Brian Rosner
I have recently come across needing to have the choices of a django.db.models.Field be dynamic or atleast a callable. I asked in the IRC room, but it turns out choices only accepts a iterable. While an QuerySet is an iterable, it would end up caching the value of the returned values. I don'

Re: DecimalField and 'decimal' module.

2007-07-23 Thread oggie rob
> are you sure this is the same issue? > > from what i saw in the tickethttp://www.initd.org/tracker/psycopg/ticket/192, > > it seems that it can fail even when both sub-interpreters run the same > version of python/django... > > gabor Sorry, gabor I didn't see this earlier. Yes, I'm pretty certa

More signals? Ticket #2861

2007-07-23 Thread Marek Kubica
Hi! Today I ran into a problem concerning ManyToManyFields. When I have a model which has a ManyToManyField with a custom save() method and try to access this ManyToManyField I get the old values of the M2M relation. This is nothing special, as some kind folks on IRC told me. But I needed the Man

Re: reverse pagination be made default?

2007-07-23 Thread Amit Upadhyay
On 7/23/07, Tom Tobin <[EMAIL PROTECTED]> wrote: > > This assumes pagination is always done on date-sorted items; there are > plenty of other uses for pagination (e.g., splitting up a very long > list of books, sorted alphabetically by title). I *really* wouldn't > want to wonder why my books are

Re: reverse pagination be made default?

2007-07-23 Thread Amit Upadhyay
On 7/23/07, Tom Tobin <[EMAIL PROTECTED]> wrote: > > > On 7/22/07, Amit Upadhyay <[EMAIL PROTECTED]> wrote: > > I have just uploaded a patch for what I call "reverse pagination". > Please > > read about it here: > > http://code.djangoproject.com/ticket/4956. You can see it > > in action on my blog:

Re: DecimalField and 'decimal' module.

2007-07-23 Thread oggie rob
> The recommendation I would make for now is that applications using new > Django builds should use psycopg2 and applications using older builds > should use psycopg1. This way there are two executables that don't > clash in any way. I have done this myself and it eliminated all the > problems I h

Re: DecimalField and 'decimal' module.

2007-07-23 Thread Gábor Farkas
oggie rob wrote: >>> does this also affect psycopg1? >> Looking at psycopg1 code, the answer would appear to be that it is not >> affected. Changes to support Decimal appear to be psycopg2 specific. >> >> Graham > > The problems I was seeing the other day were repeatable both using > strictly psy

Re: DecimalField and 'decimal' module.

2007-07-23 Thread oggie rob
> > does this also affect psycopg1? > > Looking at psycopg1 code, the answer would appear to be that it is not > affected. Changes to support Decimal appear to be psycopg2 specific. > > Graham The problems I was seeing the other day were repeatable both using strictly psycopg1 (in fact, that was

Re: reverse pagination be made default?

2007-07-23 Thread Luke Plant
On Monday 23 July 2007 01:54:19 Amit Upadhyay wrote: > Hi, > > I have just uploaded a patch for what I call "reverse pagination". > Please read about it here: http://code.djangoproject.com/ticket/4956. > You can see it in action on my blog: http://www.amitu.com/blog/. I've replied on the tracker

Re: DecimalField and 'decimal' module.

2007-07-23 Thread Graham Dumpleton
On Jul 23, 7:33 pm, Gábor Farkas <[EMAIL PROTECTED]> wrote: > Graham Dumpleton wrote: > > > The reason I am asking is that there were recently problems found with > > pyscopg2 module and its support for use of decimal.Decimal type. In > > practice this only affects people who use mod_python or mod

Re: schema evolution

2007-07-23 Thread Derek Anderson
actually, "model changes, db needs update" is exactly what i think about when i think of schema evolution. ;) but seriously... > * You have to change all your code at once to match the new name >(evolution is a slow process in nature ;-) excellent point. for large apps, optionally/tem

Re: DecimalField and 'decimal' module.

2007-07-23 Thread Gábor Farkas
Graham Dumpleton wrote: > > The reason I am asking is that there were recently problems found with > pyscopg2 module and its support for use of decimal.Decimal type. In > practice this only affects people who use mod_python or mod_wsgi and > run two different Django application instances in two d

Re: DecimalField and 'decimal' module.

2007-07-23 Thread Graham Dumpleton
On Jul 23, 5:03 pm, "Russell Keith-Magee" <[EMAIL PROTECTED]> wrote: > On 7/23/07, Graham Dumpleton <[EMAIL PROTECTED]> wrote: > > > > > Rather obscure question here. I noted a comment over on the user list > > about SVN version of Django supporting a DecimalField database type. > > What is the re

Re: Ticket #399 (Bigint field object needed) status

2007-07-23 Thread Peter Nixon
On Sun 22 Jul 2007, Adrian Holovaty wrote: > On 7/11/07, Peter Nixon <[EMAIL PROTECTED]> wrote: > > I have added a patch to Ticket #399 at: > > http://code.djangoproject.com/attachment/ticket/399/django-bigint-200707 > >11.patch > > A few days ago, I added a hook to the database Field class -- a >

Re: schema evolution

2007-07-23 Thread David Danier
I did some thinking about the "aka"-parameter you use to name the old fieldname/modelname and some things that would be nice to have when schema _evolution_ is supported by django. I highlighted evolution, because that means more than just "model changes, db needs update" I think. I think the aka

Re: DecimalField and 'decimal' module.

2007-07-23 Thread Russell Keith-Magee
On 7/23/07, Graham Dumpleton <[EMAIL PROTECTED]> wrote: > > Rather obscure question here. I noted a comment over on the user list > about SVN version of Django supporting a DecimalField database type. > What is the relationship between this database field type and any > particular database adapter