@classmethod
    def call_superclass_new_method(self, model_name, bases, attrs):
        # There seems to be a general limitation in Django's app_label handling
        # regarding abstract models (in ModelBase). See issue 1 on github - TODO: propose patch for Django
        # We run into this problem if polymorphic.py is located in a top-level directory
        # which is directly in the python path. To work around this we temporarily set
        # app_label here for PolymorphicModel.
        meta = attrs.get('Meta', None)
        do_app_label_workaround = (meta
                                   and attrs['__module__'] == 'polymorphic'
                                   and model_name == 'PolymorphicModel'
                                   and getattr(meta, 'app_label', None) is None)

        if do_app_label_workaround:
            meta.app_label = 'poly_dummy_app_label'
        new_class = super(PolymorphicModelBase, self).__new__(self, model_name, bases, attrs)
        if do_app_label_workaround:
            del(meta.app_label)
        return new_class
Get deployment method name based on cluster version
dataset/ETHPy150Open chrisglass/django_polymorphic/polymorphic/base.py/PolymorphicModelBase.call_superclass_new_method--crossover with--dataset/ETHPy150Open openstack/fuel-web/nailgun/nailgun/task/task.py/BaseDeploymentTask.get_deployment_methods