Re: Preferred Schema Evolution Tool

2007-11-25 Thread Victor Ng
The other "schema-evolution-ng" code is very dead. I don't have time to maintain patches against Django anymore, and the patches I no longer even use my own schema evolution code - it's fallen far out of sync with Django's SVN head. FYI - it basically just did what Derek's schema evolution code

Re: cmemcached etc

2007-08-13 Thread Victor Ng
On 8/13/07, TheMaTrIx <[EMAIL PROTECTED]> wrote: > > No, its not reasonable to assume people know everything about python > from day 1. I really don't think this is an issue of knowing "everything about python". Rather - it's about knowing how to use Google: http://www.google.com/search?hl=en&q

Optimistic Locking Patch?

2007-07-31 Thread Victor Ng
Has anyone looked into implementing optimistic locking for the Django ORM? I didn't see anything logged into code.djangoproject.com or in the django-users list. Has anyone taken a stab at implementing this yet? vic -- "Never attribute to malice that which can be adequately explained by stupid

Re: Unicode URLs

2006-12-24 Thread Victor Ng
n a request comes in, Django tries to match the URLconf patterns against > the requested URL, as a normal Python string (not as a Unicode string). Is there any way to accomplish what I want? On Trac and the mailing list I found some [efforts] [2] by Victor Ng to Unicode-ify things, but nothing see

Re: Schema Evolution code

2006-12-22 Thread Victor Ng
Hi, sorry for the long delay in replying. Holiday season and work craziness is getting in the way of writing free software - which is really the fun part isn't it? ;) On 12/17/06, Steve Hutton <[EMAIL PROTECTED]> wrote: > Ways in which my schema evolution code sucks: > 1) converting the dat

Re: Schema Evolution code

2006-12-16 Thread Victor Ng
FYI - the schema evolution code submitted from the SoC project doesn't work, so keeping it up to date is a moot point. There have been several posts from people trying to use it where the SoC version of the schema evolution code just halts. The implementation in my patch is basically a complete

Re: Re: Schema Evolution code

2006-12-14 Thread Victor Ng
The patch I previous sent in mostly adds a couple functions to the psycopg2 backend in the introspection module. The only big changes that affect the mainline django code are in django.core.management. I'm using my patches, so that's been tested through 3 schema updates in production. As previo

Re: Re: Schema Evolution code

2006-12-14 Thread Victor Ng
If anyone wants to poke at our schema evolution code you should be able to apply this patch attached. It's mostly working. The bugs I know about are: 1) M2M fields can't be repointed at new tables properly 2) there's some weird quirk with modifying null and db_index at the same time. i have to

Re: forcing UTF8 data inside django

2006-12-12 Thread Victor Ng
Unfortunately, not all charsets will support all unicode characters, so really, the fact that DEFAULT_CHARSET configurable is mostly a moot point for me. For example, latin1 won't let me encode asian characters. I honestly can't think of a good reason to do anything other than UTF8 unless you've

Re: forcing UTF8 data inside django

2006-12-11 Thread Victor Ng
countries and people from all over the world. vic On 12/11/06, mezhaka <[EMAIL PROTECTED]> wrote: > > On Dec 11, 6:02 am, "Victor Ng" <[EMAIL PROTECTED]> wrote: > > Hi all, > > > > The unicode problem seems to creep up in this list a lot, so he

Re: forcing UTF8 data inside django

2006-12-11 Thread Victor Ng
Hi Gabor, First off, I just realized that the code I posted earlier has a small bug. Line 17 should've read: 17 for key, vallist in cgiargs.lists(): the old code used 'items()' which only pulls a single value out of multivaluedict. On to unicode The reason I'm paranoid ab

Re: Why not Django

2006-11-30 Thread Victor Ng
On 11/30/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Victor Ng wrote: > > > If user A and user B are editting the same records and you enter a > > race where they do this: > > > > A) retrieve record > > Here you mean SELECT FOR UPDATE, ri

Re: Why not Django

2006-11-30 Thread Victor Ng
On 11/30/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Even if you are right and the use of numeric is the right decision, > still naming the fixed decimal type 'float' is, well, surprising ;-) Agreed. It *is* surprising. > I will really appreciate an example showing when SELECT FOR UPDA

Re: Why not Django

2006-11-30 Thread Victor Ng
On 11/30/06, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > > Victor Ng wrote: > > > If you're dealing with money at all - you absolutely cannot use float, > > you *must* use fixed decimal types or you risk getting into all kinds > > of really terrible round

Re: Why not Django

2006-11-30 Thread Victor Ng
I find this interesting too since the use of numeric instead of a float is the right decision most of the time. If you're dealing with money at all - you absolutely cannot use float, you *must* use fixed decimal types or you risk getting into all kinds of really terrible rounding errors. I'm fra

Re: django something wrong with many to many relationship

2006-11-30 Thread Victor Ng
Your error is in your logs: ProgrammingError: ERROR: null value in column "age" violates not-null constraint You need to specify an age value, or define age=models.IntegerField(null=True) vic On 11/30/06, gregor <[EMAIL PROTECTED]> wrote: > > Hello i have manytomany relations (database Postgr

Unicode, unicode, more unicode

2006-08-24 Thread Victor Ng
Hi all, I've been working on a django application which has to support unicode pretty much all the way through. We have to support multiple unicode scripts in the rendering of pages, in form submission, database layer, even URLs. >From my somewhat poor research for the last couple of weeks, the

Re: IN field lookup with empty list

2006-08-24 Thread Victor Ng
If you're talking about what I think you're talking about - I've posted a patch to this a while ago. http://code.djangoproject.com/ticket/2519 No unit test attached to it, anyone want to do the part that I was too lazy to do? :) vic On 8/24/06, Enrico <[EMAIL PROTECTED]> wrote: > > Hi Jacob,