Answer the question
In order to leave comments, you need to log in
Why does an error occur when loading fixtures?
The model is like this:
class Employee(models.Model):
lastname = models.CharField('Фамилия', max_length=50)
firstname = models.CharField('Имя', max_length=50)
secondname = models.CharField('Отчество', max_length=50)
birthdate = models.DateField('Дата рождения')
email = models.EmailField('Электронная почта', max_length=50)
phone = models.CharField('Телефон', max_length=15)
begin_work = models.DateTimeField('Начало работы')
end_work = models.DateTimeField('Окончание работы', blank=True, null=True, default=None)
position = models.ForeignKey(Position)
department = models.ForeignKey(Department)
[
{
"model":"employees.Employee",
"pk":1,
"fields":{
"lastname":"Мишин",
"firstname":"Мирон",
"secondname":"Аверьянович",
"birthdate":"1977-01-30",
"email":"[email protected]",
"phone":"86-(257)552-2961",
"begin_work":"2016-11-25 9:11",
"end_work":"2016-11-25 17:39",
"position_id":2,
"department_id":1
}
}
]
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question