[Fixed]-Query two tables for a form

1👍

You can do in in template by foreign key {{ student.student_courseid.course_location }}

And not nessery to create student_id, Django automaticly add pk.
I don’t know, what kind of logic you want, but I think for courses and students, you need to create models.ManyToManyField.

0👍

On click of a particular student, it must show the information(course details also)

so I guess, this will work.

{{student.student_courseid.course_loation}} in your html page.

Hope this should work, because by default.

Leave a comment