'We must define our Typeclasses as proxies. We also store the
path directly on the class, this is required by managers.'

def __new__(cls, name, bases, attrs):

    attrs['typename'] = name
    attrs['path'] = ('%s.%s' % (attrs['__module__'], name))
    if (not ('Meta' in attrs)):
        class Meta(object, ):
            proxy = True
            app_label = attrs.get('__applabel__', 'typeclasses')
        attrs['Meta'] = Meta
    attrs['Meta'].proxy = True
    new_class = patched_new(cls, name, bases, attrs)
    signals.post_save.connect(post_save, sender=new_class)
    signals.pre_delete.connect(remove_attributes_on_delete, sender=new_class)
    return new_class
