Thank you !
I was should be set up unique=True
2014年5月12日月曜日 18時46分22秒 UTC+9 Erik Cederstrand:
>
> Den 12/05/2014 kl. 11.38 skrev hito koto >:
>
>
> > Ok, Thank you!
> >
> > So, this is my the full codes;
>
> Are you sure your database is in sync with your model? The error message
> implies
Reset your database and test again.
2014-05-12 10:46 GMT+01:00 Erik Cederstrand :
> Den 12/05/2014 kl. 11.38 skrev hito koto :
>
> > Ok, Thank you!
> >
> > So, this is my the full codes;
>
> Are you sure your database is in sync with your model? The error message
> implies that the field is defi
Den 12/05/2014 kl. 11.38 skrev hito koto :
> Ok, Thank you!
>
> So, this is my the full codes;
Are you sure your database is in sync with your model? The error message
implies that the field is defined with unique=True, but your model doesn't
define it so:
start_work = models.ForeignKey(Sta
This the error is came out when edited and saved
2014年5月12日月曜日 18時21分45秒 UTC+9 Erik Cederstrand:
>
> Den 12/05/2014 kl. 10.53 skrev hito koto >:
>
>
> > Hi,
> >
> > i have this error , why ?
> >
> >
> > (1062, "Duplicate entry '1' for key 'start_work_id'")
> > Exception Type:Integ
Ok, Thank you!
So, this is my the full codes;
class Staff(models.Model):
user = models.OneToOneField(User)
user_name = models.CharField(max_length=255,)
first_kana = models.CharField(max_length=255,)
last_kana = models.CharField(max_length=255, )
employee_number = models.Cha
Den 12/05/2014 kl. 10.53 skrev hito koto :
> Hi,
>
> i have this error , why ?
>
>
> (1062, "Duplicate entry '1' for key 'start_work_id'")
> Exception Type: IntegrityError
> Exception Value:
> (1062, "Duplicate entry '1' for key 'start_work_id'"
Please post your code for the model
Hi,
i have this error , why ?
(1062, "Duplicate entry '1' for key 'start_work_id'")
Exception Type: IntegrityError Exception Value:
(1062, "Duplicate entry '1' for key 'start_work_id'"
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To
7 matches
Mail list logo