def add_client(self, client_name, redirect_uri):
        """Adds a client application to the database, with its client name and
        redirect URI. It returns the generated client_id and client_secret
        """
        
        try:
            self.db.clients
        except __HOLE__:
            self.create_tables()
        
        client_id = self.generate_hash_sha1()
        client_secret = self.generate_hash_sha1()
        
        self.db.clients.insert(**{'client_id': client_id,
                                  'client_secret': client_secret,
                                  'redirect_uri': redirect_uri,
                                  'client_name': client_name})

        return client_id, client_secret
dataset/ETHPy150Open joaoqalves/web2py-oauth2/modules/oauth/storage/__init__.py/web2pyStorage.add_client