Unable to fetch foreign key column from base table

I suggest you start with working your way through either the Official Django Tutorial or the Django Girls Tutorial. Either one of them are going to give you the fundamental knowledge you need to properly get started with Django.

Also - when posting blocks of code here, surround each block with lines of three backtick - ` characters. This means you’ll have a line of ```, then your code, then another line of ```. This forces the forum software to keep your code properly formatted, which is critical with Python.