def get_record_class(self, datamodel, raw_data):
        is_attachment = bool(raw_data.get('_attachment_for'))
        if not is_attachment:
            return Page
        attachment_type = raw_data['_attachment_type']
        return attachment_classes.get(attachment_type, Attachment)
Returns the appropriate record class for a datamodel and raw data.
dataset/ETHPy150Open lektor/lektor/lektor/db.py/Database.get_record_class