MCQs > IT & Programming > Django > How would you create a ForeignKey from a model named Transaction, to a model named Product, with no reverse relation?

Django MCQs

How would you create a ForeignKey from a model named Transaction, to a model named Product, with no reverse relation?

Answer

Correct Answer: class Transaction(models.Model): product = models.ForeignKey(Product, related_name='+')

Explanation:

Note: This Question is unanswered, help us to find answer for this one

Django Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

Django Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it