django edit object foreign key id

Import the necessary model from Django, then retrieve the object using the foreign key id. Update the object accordingly and save the changes.