示例#1
0
    def ready(self):
        """Perform initialization for back-end"""
        self.validate_configuration()
        self.check_superuser()

        # Make sure the existing version is what we expect
        signals.pre_migrate.connect(check_old_version, sender=self)

        # Validate CATMAID environment after all migrations have been run
        signals.post_migrate.connect(validate_environment, sender=self)

        # Register history checks
        register(check_history_setup)

        # Monkey patch django-rest-swagger so that it can handle our URLs
        custom_rest_swagger_apis.patch()
示例#2
0
    def ready(self):
        """Perform initialization for back-end"""
        self.validate_configuration()
        self.check_superuser()

        # Make sure the existing version is what we expect
        signals.pre_migrate.connect(check_old_version, sender=self)

        # Validate CATMAID environment after all migrations have been run
        signals.post_migrate.connect(validate_environment, sender=self)

        # Register history checks
        register(check_history_setup)

        # Monkey patch django-rest-swagger so that it can handle our URLs
        custom_rest_swagger_apis.patch()
示例#3
0
    def ready(self):
        """Perform initialization for back-end"""
        self.validate_configuration()
        self.check_superuser()

        # Make sure the existing version is what we expect
        signals.pre_migrate.connect(check_old_version, sender=self)

        # Validate CATMAID environment after all migrations have been run
        signals.post_migrate.connect(validate_environment, sender=self)

        # Register history checks
        register(check_history_setup)

        # Monkey patch django-rest-swagger so that it can handle our URLs
        custom_rest_swagger_apis.patch()

        # If prepared statements are enabled, make sure they are created for
        # every new connection.
        if settings.PREPARED_STATEMENTS:
            db_signals.connection_created.connect(prepare_db_statements)
示例#4
0
    def ready(self):
        """Perform initialization for back-end"""
        self.validate_configuration()

        # If prepared statements are enabled, make sure they are created for
        # every new connection. Binding this signal handler has to happen before
        # the first database connection is created or connection pooling can not
        # be used with prepared statements safely.
        if settings.PREPARED_STATEMENTS:
            db_signals.connection_created.connect(prepare_db_statements)

        self.check_superuser()

        # Make sure the existing version is what we expect
        signals.pre_migrate.connect(check_old_version, sender=self)

        # Validate CATMAID environment after all migrations have been run
        signals.post_migrate.connect(validate_environment, sender=self)

        # Register history checks
        register(check_history_setup)

        # Monkey patch django-rest-swagger so that it can handle our URLs
        custom_rest_swagger_apis.patch()