def get_model(self, options):
        class ModelInstanceMetadataBase(MetadataBaseModel):
            _path = models.CharField(_('path'), max_length=255, editable=False, unique=not (options.use_sites or options.use_i18n))
            _content_type = models.ForeignKey(ContentType, editable=False)
            _object_id = models.PositiveIntegerField(editable=False)
            _content_object = generic.GenericForeignKey('_content_type', '_object_id')
            if options.use_sites:
                _site = models.ForeignKey(Site, null=True, blank=True, verbose_name=_("site"))
            if options.use_i18n:
                _language = models.CharField(_("language"), max_length=5, null=True, blank=True, db_index=True, choices=settings.LANGUAGES)
            objects = self.get_manager(options)()
        
            def __unicode__(self):
                return self._path

            class Meta:
                unique_together = self.get_unique_together(options)
                abstract = True

            def _process_context(self, context):
                context['content_type'] = self._content_type
                context['model_instance'] = self

            def _populate_from_kwargs(self):
                return {'model_instance': self._content_object}

            def save(self, *args, **kwargs):
                try:
                    path_func = self._content_object.get_absolute_url
                except __HOLE__:
                    pass
                else:
                    self._path = path_func()
                super(ModelInstanceMetadataBase, self).save(*args, **kwargs)

        return ModelInstanceMetadataBase
dataset/ETHPy150Open willhardy/django-seo/rollyourown/seo/backends.py/ModelInstanceBackend.get_model