'Create a Model object from our current state into the given apps.'

def render(self, apps):

    meta_contents = {'app_label': self.app_label, 'apps': apps}
    meta_contents.update(self.options)
    meta = type('Meta', (), meta_contents)
    try:
        bases = tuple(((apps.get_model(base) if isinstance(base, str) else base) for base in self.bases))
    except LookupError:
        raise InvalidBasesError(('Cannot    resolve    one    or    more    bases    from    %r' % (self.bases,)))
    body = {name: field.clone() for (name, field) in self.fields}
    body['Meta'] = meta
    body['__module__'] = '__fake__'
    body.update(self.construct_managers())
    return type(self.name, bases, body)
