@classmethod
    def get(cls, obj_or_name, save=True):
        # Already an instance
        if isinstance(obj_or_name, cls):
            return obj_or_name

        # String, so get or create a system by this name
        if isinstance(obj_or_name, basestring):
            return _get_or_create(cls, name=obj_or_name)

        # Fallback to model object
        obj = obj_or_name

        if not isinstance(obj, models.Model):
            raise TypeError('This classmethod only supports get Systems for model objects.')
        if not obj.pk:
            raise ValueError('Model object has no primary key.')
        ct = ContentType.objects.get_for_model(obj.__class__)
        try:
            obj = cls.objects.get(content_type=ct, object_id=obj.pk)
        except cls.DoesNotExist:
            obj = cls(content_type=ct, object_id=obj.pk)
            if save:
                obj.save()
        return obj
Returns a System instance representing this object.
dataset/ETHPy150Open chop-dbhi/django-sts/sts/models.py/System.get