Python django.db.models.signals.post_migrate 模块,connect() 实例源码

我们从Python开源项目中,提取了以下50个代码示例,用于说明如何使用django.db.models.signals.post_migrate.connect()

项目:django-icekit    作者:ic-labs    | 项目源码 | 文件源码
def ready(self):
        # Monkey-patch `RedirectNodeAdmin` to replace `fieldsets` attribute
        # with `base_fieldsets` to avoid infinitie recursion bug when using
        # django-polymorphic versions >= 0.8 and < 1.1, see:
        # https://github.com/django-fluent/django-fluent-pages/issues/110
        from django.conf import settings
        if 'fluent_pages.pagetypes.redirectnode' in settings.INSTALLED_APPS:
            from fluent_pages.pagetypes.redirectnode.admin \
                import RedirectNodeAdmin
            if getattr(RedirectNodeAdmin, 'fieldsets', None):
                RedirectNodeAdmin.base_fieldsets = RedirectNodeAdmin.fieldsets
                RedirectNodeAdmin.fieldsets = None

        # Connect signal handlers.
        post_migrate.connect(update_site, sender=self)

        # Import plugins from installed apps.
        autodiscover_modules('plugins')
项目:lifesoundtrack    作者:MTG    | 项目源码 | 文件源码
def ready(self):
        post_migrate.connect(create_default_site, sender=self)
项目:django-chemtrails    作者:inonit    | 项目源码 | 文件源码
def ready(self):
        from .signals.handlers import (
            m2m_changed_handler, post_migrate_handler,
            post_save_handler, pre_delete_handler
        )

        m2m_changed.connect(receiver=m2m_changed_handler,
                            dispatch_uid='chemtrails.signals.handlers.m2m_changed_handler')
        post_save.connect(receiver=post_save_handler,
                          dispatch_uid='chemtrails.signals.handlers.post_save_handler')
        pre_delete.connect(receiver=pre_delete_handler,
                           dispatch_uid='chemtrails.signals.handlers.pre_delete_handler')

        post_migrate.connect(receiver=post_migrate_handler,
                             dispatch_uid='neomodel.core.post_migrate_handler')

        # Neo4j config
        config.DATABASE_URL = getattr(settings, 'NEO4J_BOLT_URL',
                                      os.environ.get('NEO4J_BOLT_URL', config.DATABASE_URL))
        config.FORCE_TIMEZONE = getattr(settings, 'NEO4J_FORCE_TIMEZONE',
                                        get_environment_variable('NEO4J_FORCE_TIMEZONE', False))
        config.ENCRYPTED_CONNECTION = getattr(settings, 'NEO4J_ENCRYPTED_CONNECTION',
                                              get_environment_variable('NEO4J_ENCRYPTED_CONNECTION', True))
        config.MAX_POOL_SIZE = getattr(settings, 'NEO4J_MAX_POOL_SIZE',
                                       get_environment_variable('NEO4J_MAX_POOL_SIZE', 50))
项目:CodingDojo    作者:ComputerSocietyUNB    | 项目源码 | 文件源码
def ready(self):
        post_migrate.connect(create_permissions,
            dispatch_uid="django.contrib.auth.management.create_permissions")
        checks.register(check_user_model, checks.Tags.models)
项目:CodingDojo    作者:ComputerSocietyUNB    | 项目源码 | 文件源码
def ready(self):
        post_migrate.connect(update_contenttypes)
        checks.register(check_generic_foreign_keys, checks.Tags.models)
项目:CodingDojo    作者:ComputerSocietyUNB    | 项目源码 | 文件源码
def ready(self):
        post_migrate.connect(create_default_site, sender=self)
项目:NarshaTech    作者:KimJangHyeon    | 项目源码 | 文件源码
def ready(self):
        post_migrate.connect(
            create_permissions,
            dispatch_uid="django.contrib.auth.management.create_permissions"
        )
        checks.register(check_user_model, checks.Tags.models)
        checks.register(check_models_permissions, checks.Tags.models)
项目:NarshaTech    作者:KimJangHyeon    | 项目源码 | 文件源码
def ready(self):
        pre_migrate.connect(inject_rename_contenttypes_operations, sender=self)
        post_migrate.connect(update_contenttypes)
        checks.register(check_generic_foreign_keys, checks.Tags.models)
项目:NarshaTech    作者:KimJangHyeon    | 项目源码 | 文件源码
def ready(self):
        post_migrate.connect(create_default_site, sender=self)
项目:tecken    作者:mozilla-services    | 项目源码 | 文件源码
def ready(self):
        post_migrate.connect(attach_token_permissions, sender=self)
项目:tecken    作者:mozilla-services    | 项目源码 | 文件源码
def ready(self):
        post_migrate.connect(create_default_groups, sender=self)
项目:Scrum    作者:prakharchoudhary    | 项目源码 | 文件源码
def ready(self):
        post_migrate.connect(
            create_permissions,
            dispatch_uid="django.contrib.auth.management.create_permissions"
        )
        checks.register(check_user_model, checks.Tags.models)
        checks.register(check_models_permissions, checks.Tags.models)
项目:Scrum    作者:prakharchoudhary    | 项目源码 | 文件源码
def ready(self):
        pre_migrate.connect(inject_rename_contenttypes_operations, sender=self)
        post_migrate.connect(create_contenttypes)
        checks.register(check_generic_foreign_keys, checks.Tags.models)
项目:Scrum    作者:prakharchoudhary    | 项目源码 | 文件源码
def ready(self):
        post_migrate.connect(create_default_site, sender=self)
项目:django    作者:alexsukhrin    | 项目源码 | 文件源码
def ready(self):
        post_migrate.connect(
            create_permissions,
            dispatch_uid="django.contrib.auth.management.create_permissions"
        )
        checks.register(check_user_model, checks.Tags.models)
        checks.register(check_models_permissions, checks.Tags.models)
项目:django    作者:alexsukhrin    | 项目源码 | 文件源码
def ready(self):
        pre_migrate.connect(inject_rename_contenttypes_operations, sender=self)
        post_migrate.connect(create_contenttypes)
        checks.register(check_generic_foreign_keys, checks.Tags.models)
项目:django    作者:alexsukhrin    | 项目源码 | 文件源码
def ready(self):
        post_migrate.connect(create_default_site, sender=self)
项目:PonyConf    作者:PonyConf    | 项目源码 | 文件源码
def ready(self):
        import cfp.signals  # noqa
        post_migrate.connect(cfp.signals.call_first_site_post_save, sender=self)
项目:django-mpathy    作者:craigds    | 项目源码 | 文件源码
def ready(self):
        from .operations import inject_pre_migration_operations, inject_post_migration_operations

        pre_migrate.connect(inject_pre_migration_operations, sender=self)
        post_migrate.connect(inject_post_migration_operations, sender=self)
项目:django-oscar-bluelight    作者:thelabnyc    | 项目源码 | 文件源码
def ready(self):
        super().ready()
        post_migrate.connect(post_migrate_ensure_all_system_groups_exist)
项目:Gypsy    作者:benticarlos    | 项目源码 | 文件源码
def ready(self):
        post_migrate.connect(
            create_permissions,
            dispatch_uid="django.contrib.auth.management.create_permissions"
        )
        checks.register(check_user_model, checks.Tags.models)
        checks.register(check_models_permissions, checks.Tags.models)
项目:Gypsy    作者:benticarlos    | 项目源码 | 文件源码
def ready(self):
        pre_migrate.connect(inject_rename_contenttypes_operations, sender=self)
        post_migrate.connect(update_contenttypes)
        checks.register(check_generic_foreign_keys, checks.Tags.models)
项目:Gypsy    作者:benticarlos    | 项目源码 | 文件源码
def ready(self):
        post_migrate.connect(create_default_site, sender=self)
项目:DjangoBlog    作者:0daybug    | 项目源码 | 文件源码
def ready(self):
        post_migrate.connect(create_permissions,
            dispatch_uid="django.contrib.auth.management.create_permissions")
        checks.register(check_user_model, checks.Tags.models)
项目:DjangoBlog    作者:0daybug    | 项目源码 | 文件源码
def ready(self):
        post_migrate.connect(update_contenttypes)
        checks.register(check_generic_foreign_keys, checks.Tags.models)
项目:DjangoBlog    作者:0daybug    | 项目源码 | 文件源码
def ready(self):
        post_migrate.connect(create_default_site, sender=self)
项目:mhacks-admin    作者:mhacks    | 项目源码 | 文件源码
def ready(self):
        post_migrate.connect(add_permissions, sender=self)
项目:wanblog    作者:wanzifa    | 项目源码 | 文件源码
def ready(self):
        post_migrate.connect(create_permissions,
            dispatch_uid="django.contrib.auth.management.create_permissions")
        checks.register(check_user_model, checks.Tags.models)
项目:wanblog    作者:wanzifa    | 项目源码 | 文件源码
def ready(self):
        post_migrate.connect(update_contenttypes)
        checks.register(check_generic_foreign_keys, checks.Tags.models)
项目:wanblog    作者:wanzifa    | 项目源码 | 文件源码
def ready(self):
        post_migrate.connect(create_default_site, sender=self)
项目:tabmaster    作者:NicolasMinghetti    | 项目源码 | 文件源码
def ready(self):
        post_migrate.connect(create_permissions,
            dispatch_uid="django.contrib.auth.management.create_permissions")
        checks.register(check_user_model, checks.Tags.models)
项目:tabmaster    作者:NicolasMinghetti    | 项目源码 | 文件源码
def ready(self):
        post_migrate.connect(update_contenttypes)
        checks.register(check_generic_foreign_keys, checks.Tags.models)
项目:tabmaster    作者:NicolasMinghetti    | 项目源码 | 文件源码
def ready(self):
        post_migrate.connect(create_default_site, sender=self)
项目:trydjango18    作者:lucifer-yqh    | 项目源码 | 文件源码
def ready(self):
        post_migrate.connect(create_permissions,
            dispatch_uid="django.contrib.auth.management.create_permissions")
        checks.register(check_user_model, checks.Tags.models)
项目:trydjango18    作者:lucifer-yqh    | 项目源码 | 文件源码
def ready(self):
        post_migrate.connect(update_contenttypes)
        checks.register(check_generic_foreign_keys, checks.Tags.models)
项目:trydjango18    作者:lucifer-yqh    | 项目源码 | 文件源码
def ready(self):
        post_migrate.connect(create_default_site, sender=self)
项目:trydjango18    作者:wei0104    | 项目源码 | 文件源码
def ready(self):
        post_migrate.connect(create_permissions,
            dispatch_uid="django.contrib.auth.management.create_permissions")
        checks.register(check_user_model, checks.Tags.models)
项目:trydjango18    作者:wei0104    | 项目源码 | 文件源码
def ready(self):
        post_migrate.connect(update_contenttypes)
        checks.register(check_generic_foreign_keys, checks.Tags.models)
项目:trydjango18    作者:wei0104    | 项目源码 | 文件源码
def ready(self):
        post_migrate.connect(create_default_site, sender=self)
项目:ims    作者:ims-team    | 项目源码 | 文件源码
def ready(self):
        post_migrate.connect(
            create_permissions,
            dispatch_uid="django.contrib.auth.management.create_permissions"
        )
        checks.register(check_user_model, checks.Tags.models)
        checks.register(check_models_permissions, checks.Tags.models)
项目:ims    作者:ims-team    | 项目源码 | 文件源码
def ready(self):
        pre_migrate.connect(inject_rename_contenttypes_operations, sender=self)
        post_migrate.connect(update_contenttypes)
        checks.register(check_generic_foreign_keys, checks.Tags.models)
项目:ims    作者:ims-team    | 项目源码 | 文件源码
def ready(self):
        post_migrate.connect(create_default_site, sender=self)
项目:lifesoundtrack    作者:MTG    | 项目源码 | 文件源码
def ready(self):
        super(AuthConfig, self).ready()
        post_migrate.connect(
            create_permissions,
            dispatch_uid="django.contrib.auth.management.create_permissions"
        )
        checks.register(check_models_permissions, checks.Tags.models)
项目:lifesoundtrack    作者:MTG    | 项目源码 | 文件源码
def ready(self):
        pre_migrate.connect(inject_rename_contenttypes_operations, sender=self)
        post_migrate.connect(create_contenttypes)
        checks.register(check_generic_foreign_keys, checks.Tags.models)
项目:django-open-lecture    作者:DmLitov4    | 项目源码 | 文件源码
def ready(self):
        post_migrate.connect(
            create_permissions,
            dispatch_uid="django.contrib.auth.management.create_permissions"
        )
        checks.register(check_user_model, checks.Tags.models)
        checks.register(check_models_permissions, checks.Tags.models)
项目:django-open-lecture    作者:DmLitov4    | 项目源码 | 文件源码
def ready(self):
        pre_migrate.connect(inject_rename_contenttypes_operations, sender=self)
        post_migrate.connect(update_contenttypes)
        checks.register(check_generic_foreign_keys, checks.Tags.models)
项目:django-open-lecture    作者:DmLitov4    | 项目源码 | 文件源码
def ready(self):
        post_migrate.connect(create_default_site, sender=self)
项目:sdust-online-judge    作者:kawaiiQ    | 项目源码 | 文件源码
def ready(self):
        post_migrate.connect(callback, sender=self)
项目:sdust-online-judge    作者:kawaiiQ    | 项目源码 | 文件源码
def ready(self):
        post_migrate.connect(callback, sender=self)
项目:travlr    作者:gauravkulkarni96    | 项目源码 | 文件源码
def ready(self):
        post_migrate.connect(
            create_permissions,
            dispatch_uid="django.contrib.auth.management.create_permissions"
        )
        checks.register(check_user_model, checks.Tags.models)
        checks.register(check_models_permissions, checks.Tags.models)