I have the following pattern in my code:
cursor.execute("INSERT INTO main_catalog (1,'mark')")
conn.commit()
item = Catalog.objects.get(pk=1)
item.do_something()
However, I get an error saying that Catalog.DoesNotExist
for id=1, even though I can see it in the database. How do I get the ORM to recognize this new value so I can then query it? (Note that I must use raw sql for certain reasons.)