`opts = obj._meta` needs to be written as `options = utils.model_options`. See the help text on the `utils.model_options` method.