def __define_table(self):

        _debug("S3Importer.__define_table()")

        T = current.T
        db = current.db
        request = current.request

        self.upload_tablename = self.UPLOAD_TABLE_NAME

        import_upload_status = {
            1: T("Pending"),
            2: T("In error"),
            3: T("Completed"),
        }

        def user_name_represent(id):
            # @todo: use s3_represent_user?

            if not id:
                return current.messages["NONE"]
            table = db.auth_user
            row = db(table.id == id).select(table.first_name,
                                            table.last_name,
                                            limitby=(0, 1)).first()
            try:
                return "%s %s" % (row.first_name, row.last_name)
            except:
                return current.messages.UNKNOWN_OPT

        def status_represent(index):
            if index is None:
                return current.messages.UNKNOWN_OPT
            else:
                return import_upload_status[index]

        now = request.utcnow
        table = self.define_upload_table()
        table.file.upload_folder = os.path.join(request.folder,
                                                "uploads",
                                                #"imports"
                                                )
        messages = self.messages
        table.file.comment = DIV(_class="tooltip",
                                 _title="%s|%s" % (messages.import_file,
                                                   messages.import_file_comment))
        table.file.label = messages.import_file
        table.status.requires = IS_IN_SET(import_upload_status, zero=None)
        table.status.represent = status_represent
        table.user_id.label = messages.user_name
        table.user_id.represent = user_name_represent
        table.created_on.default = now
        table.created_on.represent = self.date_represent
        table.modified_on.default = now
        table.modified_on.update = now
        table.modified_on.represent = self.date_represent

        table.replace_option.label = T("Replace")

        self.upload_table = db[self.UPLOAD_TABLE_NAME]

    # -------------------------------------------------------------------------
Given a string or unicode instance, produce a new URL instance.
dataset/ETHPy150Open sahana/eden/modules/s3/s3import.py/S3Importer.__define_table--crossover with--dataset/ETHPy150Open RoseOu/flasky/venv/lib/python2.7/site-packages/sqlalchemy/engine/url.py/make_url