> I'm having a weird problem when usinginlineformset_factory, he can
Daniel Roseman
unread,
Nov 7, 2008, 9:10:10 AM11/7/08
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message as abuse
Sign in to report message as abuse
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Django users
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.
You might want to try OneToOneField there instead and drop the
unique=True.
--
DR.
Karen Tracey
unread,
Nov 7, 2008, 9:30:34 AM11/7/08
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message as abuse
Sign in to report message as abuse
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to django...@googlegroups.com
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:
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
Petry
unread,
Nov 7, 2008, 10:24:40 AM11/7/08
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message as abuse
Sign in to report message as abuse
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Django users
I changed my template model to use OneToOneField and remove the
Blank=True, but the same error appears...
Petry
unread,
Nov 8, 2008, 8:56:06 AM11/8/08
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message as abuse
Sign in to report message as abuse
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Django users
somebody can help me?
On 7 nov, 13:24, Petry <marcospe...@gmail.com> 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" <kmtra...@gmail.com> wrote:
>
> > On Fri, Nov 7, 2008 at 9:10 AM, Daniel Roseman <
>
> > roseman.dan...@googlemail.com> wrote:
>
> > > > 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/ >
> > > > --
>
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
Petry
unread,
Nov 8, 2008, 10:51:38 AM11/8/08
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message as abuse
Sign in to report message as abuse
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Django users
Hi Karen!
I use the version of SVN, I am currently with version 1.1 pre-
alpha-9335 SVN
You do not have permission to delete messages in this group
Copy link
Report message as abuse
Sign in to report message as abuse
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Django users
As noted in a duplicate post over on django-devs this problem is not
evident when using the sqlite backend. The problem seems to be
limited to the postgres backend and is cuurently still failing for me
on trunk at revision 9526.
Roger.
Yanik
unread,
Nov 27, 2008, 3:14:20 PM11/27/08
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message as abuse
Sign in to report message as abuse
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Django users
I'm using MySQL and running 1.0.2 and the bug is still there.
is closed, but the code still hasn't been fixed and the mentioned
patch doesn't seem to work.
Has anyone gotten this to work?
Has anyone gotten what to work? The referenced ticket is fixed, it may or may not have had any bearing on the original problem posted. I mentioned it back then because I did not have time just then to devote to looking into the original problem and based on what someone else who responded said it sounded like the problem in that ticket could be the cause of the problem reported in this thread. I have just cut-and-pasted the original models, views, and forms and using current trunk code and MySQL I cannot see any problem adding multiple (up to 4, the limit of the form) phone numbers to a user. So I don't know what bug you are talking about when you say the bug is not fixed.