def robotsrulesetOfDomain(self, domain):
		'''检查domain是否在数据库中,
			否 --> (False, None)
			是 --> (True, 数据库中存储的robots.txt内容)
		'''
		exist = False
		cur = self.conn.cursor()
		# 是否存在
		cur.execute("SELECT 1 FROM Domains WHERE domain=?", (domain,))
		if cur.fetchone() :
			exist = True
		# 存在的话,结果是什么
		cur.execute("SELECT rules FROM Domains,Rulesets "
			"WHERE domain=? AND Domains.did=Rulesets.did"
			,(domain,) )
		ruleset = cur.fetchone()
		return (exist, ruleset)
def _storage(self):
        """
        Return the configured django storage backend.
        """
        config = settings.VERIFY_STUDENT["SOFTWARE_SECURE"]

        # Default to the S3 backend for backward compatibility
        storage_class = config.get("STORAGE_CLASS", "storages.backends.s3boto.S3BotoStorage")
        storage_kwargs = config.get("STORAGE_KWARGS", {})

        # Map old settings to the parameters expected by the storage backend
        if "AWS_ACCESS_KEY" in config:
            storage_kwargs["access_key"] = config["AWS_ACCESS_KEY"]
        if "AWS_SECRET_KEY" in config:
            storage_kwargs["secret_key"] = config["AWS_SECRET_KEY"]
        if "S3_BUCKET" in config:
            storage_kwargs["bucket"] = config["S3_BUCKET"]
            storage_kwargs["querystring_expire"] = self.IMAGE_LINK_DURATION

        return get_storage(storage_class, **storage_kwargs)