Answer the question
In order to leave comments, you need to log in
What is the correct way to get data from the bridle in this case?
employee
model :
.....
class Employee(models.Model):
full_name = models.CharField(max_length=60, verbose_name="Имя Фамилия")
position = models.CharField(max_length=40, verbose_name="Должность")
text = models.TextField(verbose_name="Об сотруднике")
status = models.BooleanField(verbose_name="Статус", default=1)
.....
.....
class social_link(models.Model):
employee = models.ForeignKey(Employee)
url = models.CharField(max_length=100, verbose_name="URL ")
.....
employees = Employee.objects.get(id=1)
print(employees.social_link)
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