Reverting to original file's contents
Preventing the duplicate id bug
Consolidated code by using model.DirectoriesByURL.get_or_create_one()
Debugging