Re: signals

2007-06-12 Thread Jacob Kaplan-Moss
On 6/12/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > Keeping the API similar > to what it is (or at least, "routine" to port -- possible to do with a > reg-exp, say) would be worthwhile, since there is a lot of code in the > wild using the signal infrastructure. This sums up my feelings pe

Re: PhoneNumberField

2007-06-12 Thread James Bennett
On 6/12/07, Todd O'Bryan <[EMAIL PROTECTED]> wrote: > What happens if a phone number begins with 0 (as some international > numbers are given in the U.S.)? Shouldn't it really be a CharField? It > sure as heck isn't an integer. United States phone numbers consist only of a three-digit area code,

Re: signals

2007-06-12 Thread Malcolm Tredinnick
On Wed, 2007-06-13 at 09:37 +1000, Malcolm Tredinnick wrote: > On Tue, 2007-06-12 at 06:16 -0700, Brian Harring wrote: [...] > > Model.__init__ is still a bit of a kick in the teeth offhand; > > addressing that one however requires some semi-nasty work shifting > > some of the fields related tes

Re: PhoneNumberField

2007-06-12 Thread Todd O'Bryan
On Wed, 2007-06-13 at 01:10 +, SmileyChris wrote: > http://code.djangoproject.com/ticket/4551 raises the issue that the > docs say that PhoneNumberField is a subclass of CharField when really > it's an IntegerField. > > Now that's an easy fix, but looking at the code a bit deeper it seems > t

PhoneNumberField

2007-06-12 Thread SmileyChris
http://code.djangoproject.com/ticket/4551 raises the issue that the docs say that PhoneNumberField is a subclass of CharField when really it's an IntegerField. Now that's an easy fix, but looking at the code a bit deeper it seems that USPhoneNumberField (the default newforms field) is cleaned to

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

2007-06-12 Thread Malcolm Tredinnick
On Tue, 2007-06-12 at 04:05 -0700, [EMAIL PROTECTED] wrote: > I like this patch except for some issues. > > Files cannot be saved with different names based on other data i the > model, since fields after the filefield does not set values in the > model. This also causes a problem since save is c

Re: Unicode field names

2007-06-12 Thread Malcolm Tredinnick
On Tue, 2007-06-12 at 21:16 +, Noam wrote: > Hello, > > First of all, I apologize if I post this in the wrong forum. It just > seems to me like something which requires design decisions, and not a > simple bug. If I am wrong, please correct me. > > I'm making a site which will be in Hebrew.

Re: make model.save() take kw params

2007-06-12 Thread Malcolm Tredinnick
On Wed, 2007-06-13 at 00:11 +0530, Amit Upadhyay wrote: > Hi, > > Wouldn't it be cool if we can say > user.save(email="[EMAIL PROTECTED]"), which will do the equivalent > of user.email = "[EMAIL PROTECTED]"; user.save()? Should be single > line change, putting a self.__dict__.update(kw) in model.

Re: signals

2007-06-12 Thread Malcolm Tredinnick
On Tue, 2007-06-12 at 06:16 -0700, Brian Harring wrote: > On Mon, Jun 11, 2007 at 07:39:08PM +1000, Malcolm Tredinnick wrote: > > > > On Sun, 2007-06-10 at 09:07 -0700, Brian Harring wrote: > > > Curious, how many folks are actually using dispatch at all? > > > > > > For my personal usage, I'm a

Newforms StrippedCharField

2007-06-12 Thread Norman Harman
Kind of think CharField should do this, but I can imagine someone not wanting it. class StrippedCharField(forms.CharField): """ Newforms CharField that strips trailing and leading spaces """ def clean(self, value): if value is not None: value = value.str

Unicode field names

2007-06-12 Thread Noam
Hello, First of all, I apologize if I post this in the wrong forum. It just seems to me like something which requires design decisions, and not a simple bug. If I am wrong, please correct me. I'm making a site which will be in Hebrew. I have a model with lines like these: telephone = CharFi

Re: make model.save() take kw params

2007-06-12 Thread Jacob Kaplan-Moss
See http://code.djangoproject.com/ticket/3182 -- that's the way we decided on some months ago; it just fell off my radar. Thanks for the reminder :) Jacob --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django dev

Re: make model.save() take kw params

2007-06-12 Thread Marty Alchin
Also, consider the semantics of that function call. It's obvious that the new email would be saved to the database, but it's not obvious that it would be updated on the object as well. I would personally expect something like user.save(email='[EMAIL PROTECTED]') to bypass the current object, inste

Re: make model.save() take kw params

2007-06-12 Thread Brian Harring
On Wed, Jun 13, 2007 at 12:11:29AM +0530, Amit Upadhyay wrote: >Hi, >Wouldn't it be cool if we can say >user.save(email="[EMAIL PROTECTED]"), which will do the >equivalent of user.email = "[2] [EMAIL PROTECTED]"; user.save()? Not really, no. :) Save is simple; why make it more com

make model.save() take kw params

2007-06-12 Thread Amit Upadhyay
Hi, Wouldn't it be cool if we can say user.save(email="[EMAIL PROTECTED]"), which will do the equivalent of user.email = "[EMAIL PROTECTED]"; user.save()? Should be single line change, putting a self.__dict__.update(kw) in model.save(). -- Amit Upadhyay Vakow! www.vakow.com +91-9820-295-512 --~

Re: inspectdb hack

2007-06-12 Thread Carl Karsten
Carl Karsten wrote: > I want to make a mod that may or may not ever be accepted into trunk - for > now > lets assume this will never leave my box. > > The goal is to have inspectdb create classes that use django's key > management, > so instead of creating this: > > class Assetlist(models.Mo

inspectdb hack

2007-06-12 Thread Carl Karsten
I want to make a mod that may or may not ever be accepted into trunk - for now lets assume this will never leave my box. The goal is to have inspectdb create classes that use django's key management, so instead of creating this: class Assetlist(models.Model): kAssetList_pk = models.CharFi

Re: signals

2007-06-12 Thread Brian Harring
On Mon, Jun 11, 2007 at 07:39:08PM +1000, Malcolm Tredinnick wrote: > > On Sun, 2007-06-10 at 09:07 -0700, Brian Harring wrote: > > Curious, how many folks are actually using dispatch at all? > > > > For my personal usage, I'm actually not using any of the hooks- I > > suspect most folks aren't

Re: Volunteer(s) needed: Django needs a buildbot

2007-06-12 Thread Michael Radziej
Hi Jacob, On Fri, Jun 01, Jacob Kaplan-Moss wrote: > We talked about this a while back: Django really needs a buildbot (or > some other continuous integration tool). I had planned to tackle this > myself (using Bitten -- http://bitten.cmlenz.net/) but it's getting > clear I'm not going to get it

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

2007-06-12 Thread [EMAIL PROTECTED]
I like this patch except for some issues. Files cannot be saved with different names based on other data i the model, since fields after the filefield does not set values in the model. This also causes a problem since save is called in save_FIELD_file before all values are set on the model. Not

Re: "else" clause on "ifchanged"

2007-06-12 Thread Niels
Would this make a valid use case? {% for match in matches %} {{ match }} {% endfor %} On Jun 12, 12:42 am, SmileyChris <[EMAIL PROTECTED]> wrote: > On Jun 12, 8:56 am, "Jacob Kaplan-Moss" <[EMAIL PROTECTED]> > wrote: > > > I suspect that if I saw a working patch I might lean a > > bit more t