def create_perm(self, *args, **kwargs):
        from django.contrib.auth.models import Permission
        from django.contrib.contenttypes.models import ContentType

        if ContentType._meta.installed and Permission._meta.installed:
            extra = {} if VERSION >= (1, 8) else {'name': 'config'}
            content_type, created = ContentType.objects.get_or_create(
                app_label='constance',
                model='config',
                **extra)

            permission, created = Permission.objects.get_or_create(
                name='Can change config',
                content_type=content_type,
                codename='change_config')
Commit the current transaction.
dataset/ETHPy150Open jazzband/django-constance/constance/apps.py/ConstanceConfig.create_perm--crossover with--dataset/ETHPy150Open pudo/dataset/dataset/persistence/database.py/Database.commit