Re: DB API - the limiting syntax, is it magic?

2007-12-02 Thread James Bennett
On 12/3/07, Mike Scott <[EMAIL PROTECTED]> wrote: > James, I'm think what I'm getting at more is not the fact that its > "magical", maybe that is the wrong choice of word. But my opinion is more of > the fact that it doesn't conform to the rest of the django database > commands. I suppose it

Re: Wrong length of database columns 'name', 'codename' for 'auth_permission' table.

2007-12-02 Thread Ivan Markeyev
Thank you. On 3 дек, 11:37, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote: > On 03-Dec-07, at 10:17 AM, Ivan Markeyev wrote: > > > Have no idea, how to post ticket on djangoproject.com. Server return > > to me "500 Internal Server Error (Submission rejected as potential > > spam)". > > add your

Re: DB API - the limiting syntax, is it magic?

2007-12-02 Thread Mike Scott
James, I'm think what I'm getting at more is not the fact that its "magical", maybe that is the wrong choice of word. But my opinion is more of the fact that it doesn't conform to the rest of the django database commands. I do think you put it aptly in asking do we want to be more SQL-style or

Re: Wrong length of database columns 'name', 'codename' for 'auth_permission' table.

2007-12-02 Thread Kenneth Gonsalves
On 03-Dec-07, at 10:17 AM, Ivan Markeyev wrote: > Have no idea, how to post ticket on djangoproject.com. Server return > to me "500 Internal Server Error (Submission rejected as potential > spam)". add your name and email address in the 'preferences' page of the wiki, and you will be allowed

Re: DB API - the limiting syntax, is it magic?

2007-12-02 Thread James Bennett
On 12/2/07, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > Frankly, I have found the slicing syntax hard to understand and > error-prone myself. I think one of the reasons it seems magic is that > it's one of the *rare* cases in which we use a Python > "magic-syntax-ism" (like operator overloading,

Re: DB API - the limiting syntax, is it magic?

2007-12-02 Thread James Bennett
On 12/2/07, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > Frankly, I have found the slicing syntax hard to understand and > error-prone myself. I guess I'm curious as to what's difficult or error-prone about it; I've never run into a problem where slicing was the cuplrit, and it feels like a more

Re: DB API - the limiting syntax, is it magic?

2007-12-02 Thread Adrian Holovaty
On Dec 2, 2007 8:31 AM, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Fri, 2007-11-30 at 20:00 -0800, [EMAIL PROTECTED] wrote: > > To clarify, code such as the following can be a little confusing: > > > > p = MyModel.objects.filter(foo__id = self.id).order_by('-timestamp')[: > > 1] > > if p:

Re: lazy (in utils.functional) is broken

2007-12-02 Thread Malcolm Tredinnick
On Sun, 2007-12-02 at 20:44 -0800, SmileyChris wrote: > I tried actually using lazy today for something and couldn't get it to > work. > It seems to me that the current implementation is basically broken. > > For example, I was trying to do lazy(my_function, list) > __proxy__.__init__ tries to

Wrong length of database columns 'name', 'codename' for 'auth_permission' table.

2007-12-02 Thread Ivan Markeyev
Have no idea, how to post ticket on djangoproject.com. Server return to me "500 Internal Server Error (Submission rejected as potential spam)". As i understand, 'name' and 'codename' columns for 'auth_permission' table generated automatically from object class name. 'name' are consist 'Can

lazy (in utils.functional) is broken

2007-12-02 Thread SmileyChris
I tried actually using lazy today for something and couldn't get it to work. It seems to me that the current implementation is basically broken. For example, I was trying to do lazy(my_function, list) __proxy__.__init__ tries to setattr(self, k, [promise]), but that won't actually work for any

Re: AssertionError should not be wrapped in ImproperlyConfigured

2007-12-02 Thread Malcolm Tredinnick
On Sun, 2007-12-02 at 12:17 -0800, mezhaka wrote: > I have an assertion statement in my urls.py. When it throws an > AssertionError I do not get it. Instead I get the ImproperlyConfigured > error like this: http://dpaste.com/26524/. I had to dig into the > django code to understand what's

AssertionError should not be wrapped in ImproperlyConfigured

2007-12-02 Thread mezhaka
I have an assertion statement in my urls.py. When it throws an AssertionError I do not get it. Instead I get the ImproperlyConfigured error like this: http://dpaste.com/26524/. I had to dig into the django code to understand what's happening. I have checked the svn for previous version of

Re: Django 1.0 features -- the definitive list

2007-12-02 Thread David Larlet
Le 30 nov. 07 à 07:33, Adrian Holovaty a écrit : > > Let's get a definitive list of features we want in Django 1.0, and > let's release it. Just great. > > Without further ado, here's my list: > > * newforms-admin > * queryset-refactor > * django.newforms becomes django.forms > * Model-level

Re: Django 1.0 features -- the definitive list

2007-12-02 Thread Gábor Farkas
Simon Willison wrote: > I'd love to have a simpler alternative to the regexp method that is > more friendly for developers who haven't fully grokked regular > expression syntax yet. while i agree that simplifying things is always a good idea, i think that "developers who haven't fully grokked

Re: MD5 crypt passwords

2007-12-02 Thread Yuri Baburov
On Dec 2, 2007 8:04 PM, akaihola <[EMAIL PROTECTED]> wrote: > > Changeset 5073 [1] added support for Unix DES crypt passwords (see > ticket 3316 [2] for discussion). > > Many systems use MD5-based crypt shadow passwords (see e.g. man 3 > crypt or its on-line version [3], under heading "GNU

Re: Timezone aware datetimes and MySQL (ticket #5304)

2007-12-02 Thread Ludovico Magnocavallo
On 12/2/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > I can see two fundamentally different approaches to this problem: > > 1. Deal with it at the ORM level, perhaps by getting MySQL to emulate > timezone aware datetimes by using two dB fields - a naive datetime, > and a varchar

Re: Timezone aware datetimes and MySQL (ticket #5304)

2007-12-02 Thread Malcolm Tredinnick
On Sun, 2007-12-02 at 00:19 -0800, [EMAIL PROTECTED] wrote: > This ticket as been stuck in 'design decision needed' for a few months > now. I recently needed to solve this problem for a site I was > building, and came up with a workaround, so perhaps an account of my > approach can serve to get

Re: queryset-refactor: StopIteration from execute_sql() where result_type != MULTI

2007-12-02 Thread Malcolm Tredinnick
On Sun, 2007-12-02 at 00:43 -0600, Jeremy Dunck wrote: > Does it make sense for execute_sql to raise StopIteration even when > it's called with a result_type other than MULTI? No, it doesn't. I noticed that the other day, too, and I'm going to change it. Malcolm

Re: DB API - the limiting syntax, is it magic?

2007-12-02 Thread Malcolm Tredinnick
On Fri, 2007-11-30 at 20:00 -0800, [EMAIL PROTECTED] wrote: > To clarify, code such as the following can be a little confusing: > > p = MyModel.objects.filter(foo__id = self.id).order_by('-timestamp')[: > 1] > if p: > return p[0] > > To a python developer who is unfamiliar with django's

Re: Timezone aware datetimes and MySQL (ticket #5304)

2007-12-02 Thread Karen Tracey
On 12/2/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > This ticket as been stuck in 'design decision needed' for a few months > now. I recently needed to solve this problem for a site I was > building, and came up with a workaround, so perhaps an account of my > approach can serve to get

MD5 crypt passwords

2007-12-02 Thread akaihola
Changeset 5073 [1] added support for Unix DES crypt passwords (see ticket 3316 [2] for discussion). Many systems use MD5-based crypt shadow passwords (see e.g. man 3 crypt or its on-line version [3], under heading "GNU Extension"). This extension to the crypt library prefixes the encrypted

Timezone aware datetimes and MySQL (ticket #5304)

2007-12-02 Thread [EMAIL PROTECTED]
This ticket as been stuck in 'design decision needed' for a few months now. I recently needed to solve this problem for a site I was building, and came up with a workaround, so perhaps an account of my approach can serve to get the 'design decision' ball rolling... In a nutshell, the problem is