On Sat, Nov 8, 2008 at 8:56 AM, Petry <[EMAIL PROTECTED]> wrote: > > somebody can help me? >
I didn't recommend changing your code, I recommending trying with current SVN level of the 1.0.X branch or trunk, in order to ensure you have a fix that might be relevant (I still have not had time to look in detail at your particular models/forms/etc so I'm not completely sure that is what you are hitting, but it sounds likely based on Daniel Roseman's comments). You do not mention if you have tried your code on current SVN, not 1.0 Django? Karen > > On 7 nov, 13:24, Petry <[EMAIL PROTECTED]> wrote: > > I changed my template model to use OneToOneField and remove the > > Blank=True, but the same error appears... > > > > On 7 nov, 12:30, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > > > > > On Fri, Nov 7, 2008 at 9:10 AM, Daniel Roseman < > > > > > [EMAIL PROTECTED]> wrote: > > > > > > On Nov 4, 6:02 pm,Petry<[EMAIL PROTECTED]> wrote: > > > > > Hi all, > > > > > > > I'm having a weird problem when usinginlineformset_factory, he can > > > > > only register up to 2 records, after that causes a validation error > > > > > > > "(Hidden field id) User phone with this None already exists." > > > > > > > Here is my forms [1], models [2] and views [3] > > > > > > > [1]http://dpaste.com/88598/ > > > > > [2]http://dpaste.com/88599/ > > > > > [3]http://dpaste.com/88600/ > > > > > > > -- > > > > > > > Marcos DanielPetryhttp://mdpetry.net > > > > > > The problem isn't anything to do with inline forms, it's this in your > > > > model: > > > > user = models.ForeignKey(User > > > > ,blank=True > > > > ,unique=True) > > > > What you are saying here is that you can only have each value for > user > > > > once in the whole table - and that includes the value 'None', ie only > > > > one ShipSalesUser can have an empty user field. > > > > > I have not looked at the original problem in any detail, but the > failure to > > > allow multiple NULL values when unique=True is set for the field was a > > > Django bug that has been fixed, see: > > > > >http://code.djangoproject.com/ticket/9039 > > > > > So, if this is the cause of the problem, using the 1.0.X branch or > current > > > trunk code instead of 1.0 should fix it. > > > > > Karen > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---