I have a function in my views.py which inserts data into Table1 but one of the fields in Table1 is a Foreign Key to the primary key of another table known as Table2.
Note:- Table2 is empty as of now(no data).
For now, I just want to check if data is getting inserted properly in Table1, so, I have skipped the foreign key in Django ORM, but I am getting the error like "Null value in column “name” violates not-null constraint "
Can someone please tell a way to bypass this (or) any new way is appreciated.