[Answer]-Django – legacy DB and inner joins

1πŸ‘

βœ…

I haven’t ran your code but I see a few mistakes:

  1. For loop variable name should be changed [or you can change the template variable name] from jobrun to jobruns. It’s not a good practice to reuse variable names this way.
  2. You need to specify what field of the foreign key needs to be printed in the template. Something like:

{{ jobrun.jobrun_proddt.schmst_proddt|date:”M d, Y” }}

for the date. As it stands right now, you are returning the objects and not a specific field of the foreign key objects.

πŸ‘€tr33hous

Leave a comment