Re: Extending ManyToMany managers

2007-01-07 Thread Russell Keith-Magee
On 1/8/07, Gulopine <[EMAIL PROTECTED]> wrote: I'm trying to extend the manager created for a ManyToMany relationship, and I can't seem to make it happen. There's loads of information available on extending basic managers, but I can't seem to find anything on the ManyToMany variety. Given that

Re: Admin: How to ensure that at least on field is chosen from multiple fields.

2007-01-07 Thread Brian Beck
Couple more things I discovered... This page documents a RequiredIfOtherFieldsNotGiven validator that doesn't actually exist! http://www.djangoproject.com/documentation/forms/#validators (it's close to what you want but not exactly -- you want it to be required if *neither* of the other fields a

Re: Admin: How to ensure that at least on field is chosen from multiple fields.

2007-01-07 Thread Brian Beck
Whoops, don't forget to add this wherever you put that RequiredIfNoneGiven code: from django.core.validators import gettext_lazy, ValidationError --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" grou

Re: Admin: How to ensure that at least on field is chosen from multiple fields.

2007-01-07 Thread Brian Beck
borntonetwork wrote: I have a model object called Customer. It contains the typical attributes/fields you might expect (name, street, apt, city, state, etc). Among these fields are 3 called home_phone, work_phone, and cell_phone. In the admin web interface, I need to ensure that the user must e

Re: Schema Evolution code

2007-01-07 Thread Curtis Faith
If nobody want's to champion the code, I can volunteer ~3-5 hours a week to work on this stuff. My own team needs schema evolution in the long run anyway - so it's well worth my time to make sure this eventually gets back to trunk. I can devote about the same time to it perhaps a bit more in

Re: Sessions without cookies for mobile sites

2007-01-07 Thread davo
Thanks for the reply Oliver, yep I've read it several times :) To clarify a little, I'm not having any problems with sessions themselves - everything (ie authentication, user registration, session tracking) is working fine. The problem I have is that django will only work on mobile devices that s

Re: floatfield( blank=True ) wierdness

2007-01-07 Thread Brian Beck
borough peter wrote: Yet the admin interface doesn't allow me to leave it empty: IntegrityError at /xxx/xx/xxx/add/ xxx_x.myfloat may not be NULL Hi, blank=True allows admin interface input to be an empty string, while null=True allows it to be NULL in the database. You want both. C

floatfield( blank=True ) wierdness

2007-01-07 Thread borough peter
Hi list, Yet another django newbie In my model I would like to have a float field that is allowed to be empty, so I write: class xxx( models.Model ): myfloat = models.FloatField( decimal_places=6, max_digits=9, blank=True ) Yet the admin interface doesn't allow me to leave it empty: I

Admin: How to ensure that at least on field is chosen from multiple fields.

2007-01-07 Thread borntonetwork
Hi. I have a model object called Customer. It contains the typical attributes/fields you might expect (name, street, apt, city, state, etc). Among these fields are 3 called home_phone, work_phone, and cell_phone. In the admin web interface, I need to ensure that the user must enter data into at

Extending ManyToMany managers

2007-01-07 Thread Gulopine
I'm trying to extend the manager created for a ManyToMany relationship, and I can't seem to make it happen. There's loads of information available on extending basic managers, but I can't seem to find anything on the ManyToMany variety. Given that managers for ManyToMany fields are generated auto

Problem solved (Re: What is the FloatField type returned when accessing the field value ?)

2007-01-07 Thread Frédéric Roland
David, I seem to recall running into this same issue using MySQL on Windows. What version of MySQLdb are you using. If I'm remembering this correctly, I was using an older version of MySQLdb which mapped DB float/numeric fields to str and then I updated it and the newer version mapped them corr

Re: Good Web development practice

2007-01-07 Thread James Aylett
On Sun, Jan 07, 2007 at 07:44:05PM -, Brian Beck wrote: >Any usage of Redirect breaks Back button (or at least makes it usage >more difficult since you need to go back a one step more). It doesn't introduce an extra Back step; this isn't like a META EQUIV redirect or whatever. Pressing ba

Re: Good Web development practice

2007-01-07 Thread Brian Beck
[EMAIL PROTECTED] wrote: Any usage of Redirect breaks Back button (or at least makes it usage more difficult since you need to go back a one step more). It doesn't introduce an extra Back step; this isn't like a META EQUIV redirect or whatever. Pressing back still works to get them to the pag

Re: What is the FloatField type returned when accessing the field value ?

2007-01-07 Thread Frédéric Roland
The version of MySql is 5.0.21. Using MySQl Query browser I can see that product_item.price is defined as DECIMAL(6,2). I seem to recall running into this same issue using MySQL on Windows. What version of MySQLdb are you using. If I'm remembering this correctly, I was using an older version

Re: Good Web development practice

2007-01-07 Thread [EMAIL PROTECTED]
Adam Seering wrote: On Jan 6, 2007, at 6:28 AM, [EMAIL PROTECTED] wrote: > I do not really think that you need to Redirect after every post - > only > when data is altered. In general, I agree, but many Web browsers give an annoying warning message if you try to go back across a POST; it's ni